Dmytro
Dmytro

Reputation: 17176

The totals of the cart item amounts do not match order amounts on SetExpressCheckout PayPal Api

I try to make the following set express checkout paypal api request:

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

and get the following response:

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

What am I missing? Can someone see with a fresh eye? Were there some changes to the api made after PayPal and eBay separation?

Upvotes: 0

Views: 708

Answers (1)

Zhao Samanta
Zhao Samanta

Reputation: 1085

The amount value format is not correct. it should be:

PAYMENTREQUEST_0_ITEMAMT=265.90
PAYMENTREQUEST_0_HANDLINGAMT=0.00
PAYMENTREQUEST_0_AMT=265.90

Upvotes: 1

Related Questions