Question

I'm facing an issue with paypal. I just set it up on a website, and it works fine most of the time. Some times though, I'm having an error 10413:

L_SHORTMESSAGE0 -> Transaction refused because of an invalid argument. See additional error messages for details.

L_LONGMESSAGE0 -> The totals of the cart item amounts do not match order amounts.

The weird thing is that this error is apparently raised when this logic is not respected:

ITEMAMT +  SHIPPINGAMT - SHIPDISCANT+ TAXAMT = AMT

Sum of all L_PAYMENTREQUEST_0_AMT* = ITEMAMT

And in my case this logic is respected (here is a sample of data sent that raised an error).

:PAYMENTREQUEST_0_INVNUM => "480905"

:PAYMENTREQUEST_0_AMT => "11.96"

:PAYMENTREQUEST_0_TAXAMT => "0"

:PAYMENTREQUEST_0_SHIPPINGAMT => "0"

:PAYMENTREQUEST_0_SHIPDISCAMT => "0"

:PAYMENTREQUEST_0_CURRENCYCODE => USD

:PAYMENTREQUEST_0_ITEMAMT => "11.96"

:PAYMENTREQUEST_0_CUSTOM => User#551588

:L_PAYMENTREQUEST_0_PAYMENTACTION => Sale

:L_PAYMENTREQUEST_0_NAME0 => Xhilaration Top, Sleeveless XXL

:L_PAYMENTREQUEST_0_AMT0 => "3.99"

:L_PAYMENTREQUEST_0_QTY0 => "1"

:L_PAYMENTREQUEST_0_ITEMCATEGORY0 => Digital

:L_PAYMENTREQUEST_0_NAME1 => Hillard & Hanson Top, Short-sleeve XL

:L_PAYMENTREQUEST_0_AMT1 => "3.99"

:L_PAYMENTREQUEST_0_QTY1 => "1"

:L_PAYMENTREQUEST_0_ITEMCATEGORY1 => Digital

:L_PAYMENTREQUEST_0_NAME2 => Shipping and Handling (USPS)

:L_PAYMENTREQUEST_0_AMT2 => "3.98"

:L_PAYMENTREQUEST_0_QTY2 => "1"

:L_PAYMENTREQUEST_0_ITEMCATEGORY2 => Digital

SHIPPINGAMT and SHIPDISCANT and TAXAMT are = 0 all the time because we put shipping and promo as items with negative amounts. So we just basically need Sum of all L_PAYMENTREQUEST_0_AMT* = ITEMAMT = AMT, which is the case.

Something else that is interesting is that this seem to happen randomly (like sometimes it's not working for some data, and the same data will work an hour after).

I have no idea where this can come from, so any ideas are welcome.

Thanks!

Was it helpful?

Solution

I looked up the correlation ID you provided and saw that the specific item amounts are not currently being received for whatever reason.

paymentrequest_0_itemamt="11.96"
paymentrequest_0_invnum="480905"
paymentrequest_0_name="Xhilaration Top\, Sleeveless XXL" "Hillard " "Shipping and Handling (USPS)"
paymentrequest_0_qty="1" "1" "1"
paymentrequest_0_itemcategory="Digital" "Digital" "Digital" 

PayPal has no record of receiving any variable / value combination for the item amounts. We are receiving the total order amount, the total of the item amounts, and the item information but not the specific amount for each item.

It contradicts the information you provided above and I'm not sure why. To research it further you'd need to open a ticket at PayPal.com/mts and provide the exact log information you're sending to PayPal and receiving back.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top