@@ -45,7 +45,7 @@ def pay():
45
45
default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
46
46
47
47
alipay_pay_request = AlipayPayRequest ()
48
- # alipay_pay_request.path = "/ams/sandbox/ api/v1/payments/pay"
48
+ # alipay_pay_request.path = "/ams/api/v1/payments/pay"
49
49
50
50
alipay_pay_request .product_code = ProductCodeType .CASHIER_PAYMENT
51
51
alipay_pay_request .payment_notify_url = "https://www.yourNotifyUrl.com"
@@ -112,7 +112,7 @@ def pay():
112
112
def pay_consult ():
113
113
default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
114
114
pay_consult_request = AlipayPayConsultRequest ()
115
- pay_consult_request .path = "/ams/sandbox/ api/v1/payments/consult"
115
+ pay_consult_request .path = "/ams/api/v1/payments/consult"
116
116
pay_consult_request .product_code = ProductCodeType .CASHIER_PAYMENT
117
117
# pay_consult_request.customer_id = "123441"
118
118
pay_consult_request .user_region = "SG"
@@ -150,7 +150,7 @@ def pay_cancel(paymentId):
150
150
default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
151
151
152
152
alipay_pay_cancel_request = AlipayPayCancelRequest ()
153
- alipay_pay_cancel_request .path = "/ams/sandbox/ api/v1/payments/cancel"
153
+ alipay_pay_cancel_request .path = "/ams/api/v1/payments/cancel"
154
154
alipay_pay_cancel_request .payment_id = paymentId
155
155
156
156
rsp_body = default_alipay_client .execute (alipay_pay_cancel_request )
@@ -167,7 +167,7 @@ def pay_query(paymenId):
167
167
default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
168
168
169
169
alipay_pay_query_request = AlipayPayQueryRequest ()
170
- alipay_pay_query_request .path = "/ams/sandbox/ api/v1/payments/inquiryPayment"
170
+ alipay_pay_query_request .path = "/ams/api/v1/payments/inquiryPayment"
171
171
alipay_pay_query_request .payment_id = paymenId
172
172
173
173
rsp_body = default_alipay_client .execute (alipay_pay_query_request )
@@ -186,7 +186,7 @@ def capture(paymentId):
186
186
ALIPAY_PUBLIC_KEY )
187
187
188
188
alipay_capture_request = AlipayCaptureRequest ()
189
- alipay_capture_request .path = "/ams/sandbox/ api/v1/payments/capture"
189
+ alipay_capture_request .path = "/ams/api/v1/payments/capture"
190
190
alipay_capture_request .payment_id = paymentId
191
191
alipay_capture_request .capture_request_id = "python_capture_test_01"
192
192
alipay_capture_request .is_last_capture = "true"
@@ -211,7 +211,7 @@ def refund(paymentId):
211
211
ALIPAY_PUBLIC_KEY )
212
212
213
213
alipay_refund_request = AlipayRefundRequest ()
214
- alipay_refund_request .path = "/ams/sandbox/ api/v1/payments/refund"
214
+ alipay_refund_request .path = "/ams/api/v1/payments/refund"
215
215
alipay_refund_request .refund_request_id = "python_test_refund_1212"
216
216
alipay_refund_request .payment_id = paymentId
217
217
@@ -235,7 +235,7 @@ def inqueryRefund(paymentRefundRequestId):
235
235
ALIPAY_PUBLIC_KEY )
236
236
237
237
alipay_inquery_refund_request = AlipayRefundQueryRequest ()
238
- alipay_inquery_refund_request .path = "/ams/sandbox/ api/v1/payments/inquiryRefund"
238
+ alipay_inquery_refund_request .path = "/ams/api/v1/payments/inquiryRefund"
239
239
alipay_inquery_refund_request .refund_request_id = paymentRefundRequestId
240
240
241
241
rsp_body = default_alipay_client .execute (alipay_inquery_refund_request )
@@ -253,7 +253,7 @@ def createPaymentSession():
253
253
ALIPAY_PUBLIC_KEY )
254
254
255
255
alipay_create_session_request = AlipayCreateSessionRequest ()
256
- alipay_create_session_request .path = "/ams/sandbox/ api/v1/payments/createPaymentSession"
256
+ alipay_create_session_request .path = "/ams/api/v1/payments/createPaymentSession"
257
257
alipay_create_session_request .payment_request_id = "python_test_payment_request_id_1212"
258
258
alipay_create_session_request .payment_amount = Amount ("SGD" , "4200" )
259
259
alipay_create_session_request .product_code = ProductCodeType .CASHIER_PAYMENT
0 commit comments