0
我在使用經典的PayPal NVP API時遇到問題。這是抱怨總數不匹配,我真的不明白爲什麼。PayPal NVP API錯誤10413 - 購物車項目金額的總計與訂單金額不匹配
The NVP name-value pairs which are sent to Paypal
array(19) {
["METHOD"]=>
string(18) "SetExpressCheckout"
["AMT"]=>
string(5) "48.00"
["MAXAMT"]=>
string(5) "48.00"
["RETURNURL"]=>
string(40) "http://vikingchallenge/site/payPalReturn"
["CANCELURL"]=>
string(40) "http://vikingchallenge/site/payPalCancel"
["REQCONFIRMSHIPPING"]=>
string(1) "0"
["NOSHIPPING"]=>
string(1) "1"
["LOCALECODE"]=>
string(2) "GB"
["PAYMENTREQUEST_0_AMT"]=>
string(5) "48.00"
["PAYMENTREQUEST_0_CURRENCYCODE"]=>
string(3) "GBP"
["PAYMENTREQUEST_0_ITEMAMT"]=>
string(2) "40"
["PAYMENTREQUEST_0_TAXAMT"]=>
string(4) "8.00"
["PAYMENTREQUEST_0_DESC"]=>
string(6) "Adults"
["PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD"]=>
string(18) "InstantPaymentOnly"
["L_PAYMENTREQUEST_0_NAME0"]=>
string(6) "Adults"
["L_PAYMENTREQUEST_0_DESC0"]=>
string(6) "Adults"
["L_PAYMENTREQUEST_0_AMT0"]=>
string(2) "20"
["L_PAYMENTREQUEST_0_QTY0"]=>
string(1) "2"
["L_PAYMENTREQUEST_0_TAXAMT0"]=>
string(4) "8.00"
}
The response from Paypal
array(9) {
["TIMESTAMP"]=>
string(20) "2013-07-15T14:54:32Z"
["CORRELATIONID"]=>
string(13) "f64e080a80db6"
["ACK"]=>
string(7) "Failure"
["VERSION"]=>
string(4) "92.0"
["BUILD"]=>
string(7) "6868861"
["L_ERRORCODE0"]=>
string(5) "10413"
["L_SHORTMESSAGE0"]=>
string(94) "Transaction refused because of an invalid argument. See additional error messages for details."
["L_LONGMESSAGE0"]=>
string(63) "The totals of the cart item amounts do not match order amounts."
["L_SEVERITYCODE0"]=>
string(5) "Error"
}
重複:http://stackoverflow.com/questions/10191209/paypal-api-the-totals-of-the-cart-item-amounts-do-not-match-order-amounts –
這是一個不同的問題,在那個線程中,我有一個項目的數量。 –