Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

PayPal Error 10413 (version 1.4.2.0)
 
dbabaev
Sr. Member
 
Total Posts:  83
Joined:  2008-03-29
 

Hey Folks,

Some of our orders fail and customers receive this error code from PayPal:

“PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).”

We are using Website Payments Pro and in this case the customers used Visa and MasterCard. This sounds like a rounding issue in the total calculation as some customers placed orders with no problem. Please help as this is frustrating.

Thanks in advance!

Dan

 
Magento Community Magento Community
Magento Community
Magento Community
 
dbabaev
Sr. Member
 
Total Posts:  83
Joined:  2008-03-29
 

We’ve had several orders today that failed because of this error. All of them had “Credit Card” as the payment method via PayPal’s Website Payments Pro and UPS as the shipping method.

Please help out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
draiocht
Jr. Member
 
Total Posts:  23
Joined:  2009-05-04
 

Did anyone get to the bottom of this? I’ve two 1.4.2 sites, one of which is giving the error, one isn’t.

 
Magento Community Magento Community
Magento Community
Magento Community
 
dvdk
Jr. Member
 
Total Posts:  9
Joined:  2010-06-12
Sydney
 

I get this problem in conjunction with users trying to claim a gift certificate (from the Unirgy Giftcert certificate).

The paypal express code appears to send a request to paypal with the total taking the discount into account, but the individual item amount not taking any discount into consideration. For example a $28.45 sale ($20.95 item + $7.50 shipping inc tax) where a user has claimed a $20 gift voucher gets sent to the Paypal endpoint as AMT=8.45 (takes into account $20 discount), however the TAXAMT + ITEMAMT + SHIPAMT don’t include the discount, they are sent as ITEMAMT=19.05&TAXAMT;=1.90&SHIPPINGAMT;=7.5.

Paypal sees the mismatch and throws back a 10413.

I never see the 10413 error on 1.4.2.0 when users arent claiming a certificate, in these cases paypal works as it should.

However I noticed in my 1.3.2.3 installation I could use paypal express with or without gift certificates and it always worked. In order to fix 1.4.2.0 I have grabbed the /app/code/core/Mage/Paypal directory from my 1.3.2.3 installation as well as 2 files out of my 1.4.2.0 installation (/app/code/core/Mage/Paypal/Block/Express/Shortcut.php and /app/code/core/Mage/Paypal/Model/Config.php - I grabbed these as Magento complained if they were missing).

I replaced the default 1.4.2.0 /app/code/core/Mage/Paypal directory with this combination of files and no longer get any errors at all.

Definitely not an official way of fixing the problem but it solves it for me. If you’re only seeing this error in conjunction with gift vouchers I suggest you try replacing you /app/code/core/Mage/Paypal directory with the contents of http://www.mafia.org.au/magento/Paypal.tar.gz

 
Magento Community Magento Community
Magento Community
Magento Community
 
draiocht
Jr. Member
 
Total Posts:  23
Joined:  2009-05-04
 

No coupons in my case. going to reinstall the paypal module. 20% of orders being affected. Upgrade failure...?? Affecting Website Payments Pro orders, not just express..

 
Magento Community Magento Community
Magento Community
Magento Community
 
draiocht
Jr. Member
 
Total Posts:  23
Joined:  2009-05-04
 

Also, I have “Transfer Cart Line Items” set to no in config for both Paypal express, and paypal website payments pro, so I’ve no idea why Paypal is even seeing cart items.

 
Magento Community Magento Community
Magento Community
Magento Community
 
draiocht
Jr. Member
 
Total Posts:  23
Joined:  2009-05-04
 

Still going on, driving me mad. not on all orders, maybe 20%.

PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).

anyway a clue in the fail email

item 1 was 1599.00
item 2 was 344.00

total was 1974.98
which of course doesnt match. shipping.... which is not mentioned in the email.

Payment transaction failed.

Reason
PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).

Checkout Type
onepage

Customer:
BLANKED

Items
ITEM1 x 1 USD 344.0000
ITEM2 x 1 USD 1599.0000

Total:
USD 1974.98

Billing Address:
BLANKED

Shipping Address:
BLANKED (and was the same)

Shipping Method:
United Parcel Service

Payment Method:
Credit Card

Date & Time:
Jan 18, 2011 11:01:13 AM

besides… why the ^&*$@%$@ are cart items being shown to paypal anyway when in config it is set NOT TO GIVE CART ITEMS TO PAYPAL.

 
Magento Community Magento Community
Magento Community
Magento Community
 
joshuajarman
Sr. Member
 
Avatar
Total Posts:  76
Joined:  2009-04-08
 

we are getting the same error with gift certificates that do not cover the total amount of the order.

“PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).”

Did you ever get to the bottom of this?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
connor2k
Jr. Member
 
Total Posts:  14
Joined:  2008-08-06
 

I am having the same exact issue and my client is not happy. They are on the verge of changing cart sites because of all the trouble we have been having with Magento.

 
Magento Community Magento Community
Magento Community
Magento Community
 
boardpot
Jr. Member
 
Total Posts:  20
Joined:  2011-06-19
 

I have the same problem in 1.5. looking for solutions urgently

 
Magento Community Magento Community
Magento Community
Magento Community
 
Tarential
Jr. Member
 
Total Posts:  1
Joined:  2010-11-15
 

We are also experiencing this problem on a client site. Has anyone found a working solution for 1.5 yet?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Magestore
Mentor
 
Avatar
Total Posts:  1015
Joined:  2009-08-07
Viet Nam
 

Hi Dan,
The bug: “PayPal gateway has rejected request. The totals of the cart item amounts do not match order amounts (#10413: Transaction refused because of an invalid argument. See additional error messages for details).” appears when you have an inaccurate total value of order. If you use an extension changing the total value of orders, you need to apply event “paypal_prepare_line_items” to update total for PayPal checkout.
Hope you are succeed.
Magestore

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  901
Joined:  2008-10-21
 

Solution for 1.7x - Used on UK store

http://www.magentocommerce.com/boards/viewthread/291325/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top