Paypal SetExpressCheckout api错误响应

时间:2017-07-22 09:44:38

标签: php paypal

我将以下参数传递给paypal express checkout api,其中购物车总数和商品总数完全相同。

&PAYMENTREQUEST_0_AMT=53.00
&paymentrequest_0_currencycode=USD
&PAYMENTREQUEST_0_ITEMAMT=53.00
&paymentrequest_0_paymentaction=Sale&L_PAYMENTREQUEST_0_QTY1=2

&L_PAYMENTREQUEST_0_AMT1=25.00&L_PAYMENTREQUEST_0_NAME1=Tuesday+%E2%80%93+Regular+Th...
&L_PAYMENTREQUEST_0_NUMBER1=15&L_PAYMENTREQUEST_0_QTY2=1
&L_PAYMENTREQUEST_0_AMT2=15.50&L_PAYMENTREQUEST_0_NAME2=Monday+%E2%80%93+Warrior+But...&L_PAYMENTREQUEST_0_NUMBER2=14
&L_PAYMENTREQUEST_0_QTY3=1&L_PAYMENTREQUEST_0_AMT3=12.50
&L_PAYMENTREQUEST_0_NAME3=Monday+%E2%80%93+Regular+But...&L_PAYMENTREQUEST_0_NUMBER3=13

&RETURNURL=http%3A%2F%2Fwww.domain.co.nz%2F%2Fcheckout
&CANCELURL=http%3A%2F%2Fwww.domain.co.nz%2F%2Fcancelled

但我收到错误消息

(
    [TIMESTAMP] => 2017%2d07%2d22T09%3a15%3a18Z
    [CORRELATIONID] => ff403e217b47e
    [ACK] => Failure
    [VERSION] => 76%2e0
    [BUILD] => 36715329
    [L_ERRORCODE0] => 10413
    [L_SHORTMESSAGE0] => Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e
    [L_LONGMESSAGE0] => The%20totals%20of%20the%20cart%20item%20amounts%20do%20not%20match%20order%20amounts%2e
    [L_SEVERITYCODE0] => Error
)

1 个答案:

答案 0 :(得分:0)

总金额PAYMENTREQUEST_0_AMT = 53.00不正确。总订单金额应为78.00(2X25.00 + 1X15.50 + 1X12.50)。尝试以下,它有效。

paymentrequest_0_currencycode = USD&安培; paymentrequest_0_amt = 78.00&安培; paymentrequest_0_paymentaction =塞尔&安培; paymentrequest_0_name =星期二u2013普通的Th&安培; L_PAYMENTREQUEST_0_AMT1 = 25.00&安培; L_PAYMENTREQUEST_0_AMT2 = 15.50&安培; L_PAYMENTREQUEST_0_AMT3 = 12.50&安培; L_PAYMENTREQUEST_0_QTY1 = 2及L_PAYMENTREQUEST_0_QTY2 = 1&安培; L_PAYMENTREQUEST_0_QTY3 = 1 < / p>