@@ -45,7 +45,7 @@ def pay():
4545 default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
4646
4747 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"
4949
5050 alipay_pay_request .product_code = ProductCodeType .CASHIER_PAYMENT
5151 alipay_pay_request .payment_notify_url = "https://www.yourNotifyUrl.com"
@@ -112,7 +112,7 @@ def pay():
112112def pay_consult ():
113113 default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
114114 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"
116116 pay_consult_request .product_code = ProductCodeType .CASHIER_PAYMENT
117117 # pay_consult_request.customer_id = "123441"
118118 pay_consult_request .user_region = "SG"
@@ -150,7 +150,7 @@ def pay_cancel(paymentId):
150150 default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
151151
152152 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"
154154 alipay_pay_cancel_request .payment_id = paymentId
155155
156156 rsp_body = default_alipay_client .execute (alipay_pay_cancel_request )
@@ -167,7 +167,7 @@ def pay_query(paymenId):
167167 default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
168168
169169 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"
171171 alipay_pay_query_request .payment_id = paymenId
172172
173173 rsp_body = default_alipay_client .execute (alipay_pay_query_request )
@@ -186,7 +186,7 @@ def capture(paymentId):
186186 ALIPAY_PUBLIC_KEY )
187187
188188 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"
190190 alipay_capture_request .payment_id = paymentId
191191 alipay_capture_request .capture_request_id = "python_capture_test_01"
192192 alipay_capture_request .is_last_capture = "true"
@@ -211,7 +211,7 @@ def refund(paymentId):
211211 ALIPAY_PUBLIC_KEY )
212212
213213 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"
215215 alipay_refund_request .refund_request_id = "python_test_refund_1212"
216216 alipay_refund_request .payment_id = paymentId
217217
@@ -235,7 +235,7 @@ def inqueryRefund(paymentRefundRequestId):
235235 ALIPAY_PUBLIC_KEY )
236236
237237 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"
239239 alipay_inquery_refund_request .refund_request_id = paymentRefundRequestId
240240
241241 rsp_body = default_alipay_client .execute (alipay_inquery_refund_request )
@@ -253,7 +253,7 @@ def createPaymentSession():
253253 ALIPAY_PUBLIC_KEY )
254254
255255 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"
257257 alipay_create_session_request .payment_request_id = "python_test_payment_request_id_1212"
258258 alipay_create_session_request .payment_amount = Amount ("SGD" , "4200" )
259259 alipay_create_session_request .product_code = ProductCodeType .CASHIER_PAYMENT
0 commit comments