简体   繁体   中英

Paypal SetExpressCheckout api error response

I am passing following parameters to paypal express checkout api where cart total and item total are exactly same.

&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

But i am getting error message

(
    [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
)

The total amount PAYMENTREQUEST_0_AMT=53.00 is incorrect. The total order amount should be 78.00 ( 2X25.00+1X15.50+1X12.50). Try the below, it works.

paymentrequest_0_currencycode= USD&paymentrequest_0_amt= 78.00&paymentrequest_0_paymentaction= Sale&paymentrequest_0_name= Tuesday u2013 Regular 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM