@@ -45,11 +45,10 @@ 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/api/v1/payments/pay"
4948
5049 alipay_pay_request .product_code = ProductCodeType .CASHIER_PAYMENT
5150 alipay_pay_request .payment_notify_url = "https://www.yourNotifyUrl.com"
52- alipay_pay_request .payment_redirect_url = "https://www.yourRedirectUrl.com?param1=sl "
51+ alipay_pay_request .payment_redirect_url = "https://www.yourRedirectUrl.com"
5352 alipay_pay_request .payment_request_id = "pay_python_test" + str (uuid .uuid4 ())
5453 payment_method = PaymentMethod ()
5554 payment_method .payment_method_type = "ALIPAY_CN"
@@ -112,7 +111,6 @@ def pay():
112111def pay_consult ():
113112 default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
114113 pay_consult_request = AlipayPayConsultRequest ()
115- pay_consult_request .path = "/ams/api/v1/payments/consult"
116114 pay_consult_request .product_code = ProductCodeType .CASHIER_PAYMENT
117115 # pay_consult_request.customer_id = "123441"
118116 pay_consult_request .user_region = "SG"
@@ -150,7 +148,6 @@ def pay_cancel(paymentId):
150148 default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
151149
152150 alipay_pay_cancel_request = AlipayPayCancelRequest ()
153- alipay_pay_cancel_request .path = "/ams/api/v1/payments/cancel"
154151 alipay_pay_cancel_request .payment_id = paymentId
155152
156153 rsp_body = default_alipay_client .execute (alipay_pay_cancel_request )
@@ -167,7 +164,6 @@ def pay_query(paymenId):
167164 default_alipay_client = DefaultAlipayClient (GATEWAY_HOST , CLIENT_ID , MERCHANT_PRIVATE_KEY , ALIPAY_PUBLIC_KEY )
168165
169166 alipay_pay_query_request = AlipayPayQueryRequest ()
170- alipay_pay_query_request .path = "/ams/api/v1/payments/inquiryPayment"
171167 alipay_pay_query_request .payment_id = paymenId
172168
173169 rsp_body = default_alipay_client .execute (alipay_pay_query_request )
@@ -186,7 +182,6 @@ def capture(paymentId):
186182 ALIPAY_PUBLIC_KEY )
187183
188184 alipay_capture_request = AlipayCaptureRequest ()
189- alipay_capture_request .path = "/ams/api/v1/payments/capture"
190185 alipay_capture_request .payment_id = paymentId
191186 alipay_capture_request .capture_request_id = "python_capture_test_01"
192187 alipay_capture_request .is_last_capture = "true"
@@ -211,7 +206,6 @@ def refund(paymentId):
211206 ALIPAY_PUBLIC_KEY )
212207
213208 alipay_refund_request = AlipayRefundRequest ()
214- alipay_refund_request .path = "/ams/api/v1/payments/refund"
215209 alipay_refund_request .refund_request_id = "python_test_refund_1212"
216210 alipay_refund_request .payment_id = paymentId
217211
@@ -235,7 +229,6 @@ def inqueryRefund(paymentRefundRequestId):
235229 ALIPAY_PUBLIC_KEY )
236230
237231 alipay_inquery_refund_request = AlipayRefundQueryRequest ()
238- alipay_inquery_refund_request .path = "/ams/api/v1/payments/inquiryRefund"
239232 alipay_inquery_refund_request .refund_request_id = paymentRefundRequestId
240233
241234 rsp_body = default_alipay_client .execute (alipay_inquery_refund_request )
@@ -253,7 +246,6 @@ def createPaymentSession():
253246 ALIPAY_PUBLIC_KEY )
254247
255248 alipay_create_session_request = AlipayCreateSessionRequest ()
256- alipay_create_session_request .path = "/ams/api/v1/payments/createPaymentSession"
257249 alipay_create_session_request .payment_request_id = "python_test_payment_request_id_1212"
258250 alipay_create_session_request .payment_amount = Amount ("SGD" , "4200" )
259251 alipay_create_session_request .product_code = ProductCodeType .CASHIER_PAYMENT
0 commit comments