我已经检查了关于这个问题的所有答案,但是我找不到使它有效的东西。
我试图自定义一个贝宝支付,但要么没有出现在描述中,要么我得到的订单总额是缺失的答案。
我读到我必须在SetExpressCheckout之前做DoExpressCheckout,除返回和取消外具有相同的参数,但我得到了'不支持指定的方法',所以我不知道该怎么做。
我从这里取了代码:
https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECCustomizing/&METHOD=SetExpressCheckout
&RETURNURL=http://...
&CANCELURL=http://...
&PAYMENTREQUEST_0_PAYMENTACTION=Sale
&L_PAYMENTREQUEST_0_NAME0=10% Decaf Kona Blend Coffee
&L_PAYMENTREQUEST_0_NUMBER0=623083
&L_PAYMENTREQUEST_0_DESC0=Size: 8.8-oz
&L_PAYMENTREQUEST_0_AMT0=9.95
&L_PAYMENTREQUEST_0_QTY0=2
&L_PAYMENTREQUEST_0_NAME1=Coffee Filter bags
&L_PAYMENTREQUEST_0_NUMBER1=623084
&L_PAYMENTREQUEST_0_DESC1=Size: Two 24-piece boxes
&L_PAYMENTREQUEST_0_AMT1=39.70
&L_PAYMENTREQUEST_0_QTY1=2
&PAYMENTREQUEST_0_ITEMAMT=99.30
&PAYMENTREQUEST_0_TAXAMT=2.58
&PAYMENTREQUEST_0_SHIPPINGAMT=3.00
&PAYMENTREQUEST_0_HANDLINGAMT=2.99
&PAYMENTREQUEST_0_SHIPDISCAMT=-3.00
&PAYMENTREQUEST_0_INSURANCEAMT=1.00
&PAYMENTREQUEST_0_AMT=105.87
&PAYMENTREQUEST_0_CURRENCYCODE=USD
&ALLOWNOTE=1
我已经尝试了我的信息(用户,pwd,签名,logo…)= SetExpressCheckout及方法和AMT = 10.00
现在我想放一个项目的描述,但我总是得到'Order total is missing'。
API的回应:
TIMESTAMP=2015%2d09%2d09T09%3a03%3a23Z
&CORRELATIONID=2f370dfafc18
&ACK=Failure
&VERSION=98%2e0
&BUILD=17972692
&L_ERRORCODE0=10400
&L_SHORTMESSAGE0=Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e
&L_LONGMESSAGE0=Order%20total%20is%20missing%2e
&L_SEVERITYCODE0=Error
我检查了你的API调用日志,注意到PAYMENTREQUEST_0_AMT在你的测试中没有正确传递给PayPal。API请求代码现在正按预期工作。请重新测试并确认