Magento – Does anyone have a fix for PayPal Express NVP Gateway errors due to rounding issues

magento-1.7nvp-gateway-errorpaypal-express

The title says it all, ever since its inception to the latest stable 1.7.x.x, Magento has certain issues taking Paypal Express orders, taxation round errors cause the Magento total to not match the Paypal total with customer frustrating results.

Various settings for taxation have been recommended, it fails with all, though Row Total and Unit Price seem to cause less problems.

It also fails quite a bit if "Transfer Cart Line Items" is yes, so that's shut off.

Here's the constant issue…

2013-06-21T16:27:07+00:00 ERR (3): 
exception 'Mage_Core_Exception' with message 'PayPal NVP gateway errors: 
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). 
Correlation ID: 1b6bbf0dcad1b. Version: 60.0.' in /folder/somesite/htdoc/app/Mage.php:536

Stack trace:
#0 /folder/somesite/htdoc/app/code/core/Mage/Paypal/Model/Api/Nvp.php(952): Mage::exception('Mage_Core', 'PayPal NVP gate...')
#1 /folder/somesite/htdoc/app/code/core/Mage/Paypal/Model/Api/Nvp.php(914): Mage_Paypal_Model_Api_Nvp->_handleCallErrors(Array)

Best Answer

This is not an easy thing to fix, if you look in the release notes of Magento 1.8 it does state this is fixed however there is no formal release yet but we have used on a project and seems to have solved the issue.

Here is the release notes section on Tax http://www.magentocommerce.com/knowledge-base/entry/ce-18-later-release-notes#ce18-1800tax

As you can see there are alot of changes so may be worth trying to upgrade if its causing you real problems.

Regards