我正在尝试使用 Paypal Expresscheckout 计费协议 ID 测试参考交易。但我根本没有得到BAID。以下是我正在拨打的电话:
第 1 步:setExpresscheckout 调用:
Request
Endpoint URL: https://api-3t.sandbox.paypal.com/nvp
HTTP method: POST
------------------------------------------------------------
POST data:
USER=insert_merchant_user_name_here
&PWD=insert_merchant_password_here
&SIGNATURE=insert_merchant_signature_value_here
&METHOD=SetExpressCheckout
&VERSION=93
&PAYMENTACTION=SALE # type of payment
&AMT=19.95 # amount of transaction
&CURRENCYCODE=USD # currency of transaction
&RETURNURL=<return_url> # URL of your payment confirmation page
&CANCELURL= <cancel_url> # URL redirect if customer cancels payment
&L_BILLINGTYPE0=MerchantInitiatedBilling
-------------------
Response
----------------------
token=EC-7NH28597U8423791A
-----------------------
它将我重定向到 Paypal 进行登录,并在单击“同意并付款”按钮后,使用令牌和 payerID 将我重定向回我的网站。由于我不需要存储客户详细信息,因此我将跳过 GetExpresscheckout 调用并使用令牌和 PayedID 直接调用 doExpressCheckoutPayment。
STEP2 : 做Expresscheckoutpayment
USER=insert_merchant_user_name_here
&PWD=insert_merchant_password_here
&SIGNATURE=insert_merchant_signature_value_here
&METHOD=DoExpressCheckoutPayment
&VERSION=93
&PAYMENTACTION=SALE # type of payment
&AMT=19.95 # amount of transaction
&CURRENCYCODE=USD # currency of transaction
&TOKEN=token_value
&PAYERID=payer_id_received
这是回应。但它没有 BILLING 协议 ID。
{"map":{"PAYMENTINFO_0_REASONCODE":"None","PAYMENTINFO_0_TAXAMT":"0.00","PAYMENTINFO_0_SECUREMERCHANTACCOUNTID":"KLQ6JKXB6DPZ6","TRANSACTIONID":"96C270379E2177052","PAYMENTINFO_0_TRANSACTIONTYPE":"expresscheckout","AMT":"11.20","PAYMENTINFO_0_FEEAMT":"0.62","CORRELATIONID":"fa14c423b7813","SUCCESSPAGEREDIRECTREQUESTED":"false","TAXAMT":"0.00","PAYMENTINFO_0_CURRENCYCODE":"USD","PAYMENTINFO_0_TRANSACTIONID":"96C270379E2177052","PENDINGREASON":"None","PAYMENTINFO_0_PAYMENTTYPE":"instant","VERSION":"98.0","PAYMENTINFO_0_PENDINGREASON":"None","FEEAMT":"0.62","ACK":"Success","TRANSACTIONTYPE":"expresscheckout","TOKEN":"EC-7NH28597U8423791A","PAYMENTINFO_0_ERRORCODE":"0","BUILD":"5956203","PAYMENTINFO_0_ORDERTIME":"2013-05-12T12:55:48Z","PAYMENTINFO_0_PROTECTIONELIGIBILITY":"Eligible","INSURANCEOPTIONSELECTED":"false","ORDERTIME":"2013-05-12T12:55:48Z","PAYMENTSTATUS":"Completed","PAYMENTINFO_0_AMT":"11.20","PAYMENTINFO_0_PAYMENTSTATUS":"Completed","REASONCODE":"None","PAYMENTTYPE":"instant","PAYMENTINFO_0_ACK":"Success","PAYMENTINFO_0_PROTECTIONELIGIBILITYTYPE":"ItemNotReceivedEligible,UnauthorizedPaymentEligible","SHIPPINGOPTIONISDEFAULT":"false","TIMESTAMP":"2013-05-12T12:55:48Z","PROTECTIONELIGIBILITY":"Eligible","CURRENCYCODE":"USD"}}
FYI..paymentaction 设置为 SALE,因为我需要捕获付款。
关于出了什么问题的任何建议?
谢谢,普尼亚