我尝试发出以下设置快速结帐 paypal api 请求:
VERSION=72.0
METHOD=SetExpressCheckout
LOCALECODE=AU
RETURNURL=http://mysite.dev:1338/order/checkout-confirmation?id=1
CANCELURL=http://mysite.dev:1338/cart
PAYMENTREQUEST_0_PAYMENTACTION=Sale
PAYMENTREQUEST_0_CURRENCYCODE=AUD
NOSHIPPING=1
L_PAYMENTREQUEST_0_NAME0=The Kitty Ring
L_PAYMENTREQUEST_0_NUMBER0=2274
L_PAYMENTREQUEST_0_DESC0=
L_PAYMENTREQUEST_0_AMT0=50.00
L_PAYMENTREQUEST_0_QTY0=4.00
L_PAYMENTREQUEST_0_NAME1=GlassTop Digital Bathroom SLIM Scales Weight Body Fat Water Bone Muscle Calories
L_PAYMENTREQUEST_0_NUMBER1=2283
L_PAYMENTREQUEST_0_DESC1=
L_PAYMENTREQUEST_0_AMT1=32.95
L_PAYMENTREQUEST_0_QTY1=2.00
PAYMENTREQUEST_0_ITEMAMT=265.9000
PAYMENTREQUEST_0_HANDLINGAMT=0.00
PAYMENTREQUEST_0_AMT=265.9000
并得到如下响应:
TIMESTAMP=2015-10-20T22:20:32Z
ACK=Failure
VERSION=72.0
BUILD=18308778
L_ERRORCODE0=10401
L_ERRORCODE1=10426
L_ERRORCODE2=10413
L_SHORTMESSAGE0=Transaction refused because of an invalid argument. See additional error messages for details.
L_SHORTMESSAGE1=Transaction refused because of an invalid argument. See additional error messages for details.
L_SHORTMESSAGE2=Transaction refused because of an invalid argument. See additional error messages for details.
L_LONGMESSAGE0=Order total is invalid.
L_LONGMESSAGE1=Item total is invalid.
L_LONGMESSAGE2=The totals of the cart item amounts do not match order amounts.
L_SEVERITYCODE0=Error
L_SEVERITYCODE1=Error
L_SEVERITYCODE2=Error
我错过了什么?有人能用新的眼光看吗? PayPal
和 eBay
分离后,api 是否有一些变化?
最佳答案
金额值格式不正确。应该是:
PAYMENTREQUEST_0_ITEMAMT=265.90
PAYMENTREQUEST_0_HANDLINGAMT=0.00
PAYMENTREQUEST_0_AMT=265.90
关于c# - 购物车商品总金额与 SetExpressCheckout PayPal Api 上的订单金额不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33247930/