diff --git a/src/api/shoppingCart.ts b/src/api/shoppingCart.ts index e09abf1..dab437d 100644 --- a/src/api/shoppingCart.ts +++ b/src/api/shoppingCart.ts @@ -67,3 +67,25 @@ export const CreateOrder = (data, loading?: boolean) => { loading }) } + +/** + * 获取订单状态 + * @param { String } paymentId - 订单ID + * @param loading - 是否显示loading + * @returns + */ +export const GetOrderStatus = (paymentId: string, loading?: boolean) => { + return request({ + url: `/buyer/buyer/payment/status/${paymentId}`, + method: 'get', + loading + }) +} +export const ORDER_STATUS = { + PENDING: 0,//待支付 + SUCCESS: 1,//支付成功 + FAILED: 2,//支付失败 + CANCELED: 3,//已取消支付 + PARTIAL_REFUND: 4,//已部分退款 + FULL_REFUND: 5,//已全额退款 +} diff --git a/src/views/pay/payment.vue b/src/views/pay/payment.vue index 04b744c..3a88853 100644 --- a/src/views/pay/payment.vue +++ b/src/views/pay/payment.vue @@ -4,13 +4,13 @@ Payment Details -
+
Credit / Debit Card
-
+
I agree to the Terms & Conditions and Privacy Policy. @@ -18,11 +18,11 @@
-
+
Pay with Paypal
-