I ran into a problem with paypal. I just installed it on a website and it works great in most cases. Several times though, I have error 10413:
L_SHORTMESSAGE0 β The transaction was refused due to an invalid argument. See Additional Error Messages for more information.
L_LONGMESSAGE0 β The sum of the basket amounts does not correspond to the sum of orders.
The strange thing is that this error apparently occurs 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 an example of the data sent that caused the 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 and Hanson Top XL Short Sleeve
: 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 always 0 because we ship delivery and promos as items with negative amounts. Therefore, we just need the sum of all L_PAYMENTREQUEST_0_AMT * = ITEMAMT = AMT, which is.
Something else interesting is that it seems random (for example, sometimes it does not work for some data, and the same data will work an hour after).
I donβt know where this can come from, so any ideas are welcome.
Thanks!