July 12, 2020


Thinking Magento

Magento Paypal Error - Rounding & Discount Issue

Error: Transaction refused because of an invalid argument. See additional error messages for details. The totals of the cart item amounts do not match order amounts.

This error seems to affect most tax inclusive installations and if you start seeing it in your payment_paypal_express.log then hopefully we will be able to supply you with a solution.

The problem lies with rounding, especially if you are using percentage based discounts, but also if prices end in 9,7,3.

To combat this we have attached a new NVP.php file for Magento 1.7x. You can look into the file and search for the Hack lines to import them over into your Magento installation.

Download File

Let us know if it improved your situation or if you think that you can improve on it further.

Original source of code: http://stackoverflow.com/questions/11868985/magento-paypal-tax-rounding-issue