tldr; According to magento fix notes the rounding error is fixed in 1.8 and later. We use 1.9 and have the rounding error for paypal express. How to fix it?
In a new storeview I have an error with paypal Express Checkout.
#10413 The totals of the cart item amounts do not match order amounts.
I could break it down (with debug mode) to a rounding problem. But I have also seen that some data is not passed to magento on the new storeview (address for example)
Here is the debug from the new storeview:
(
[url] => https://api-3t.paypal.com/nvp
[SetExpressCheckout] => Array
(
[PAYMENTACTION] => Authorization
[AMT] => 97.80
[CURRENCYCODE] => EUR
[RETURNURL] => ...
[CANCELURL] => ...
[INVNUM] => 700000030
[SOLUTIONTYPE] => Mark
[GIROPAYCANCELURL] => ...
[GIROPAYSUCCESSURL] => ...
[BANKTXNPENDINGURL] => ...
[LOCALECODE] => de_DE
[ITEMAMT] => 75.55
[TAXAMT] => 15.62
[SHIPPINGAMT] => 6.64
[L_NUMBER0] => LE-PANEL595-40-CW
[L_NAME0] => ...Itemname...
[L_QTY0] => 1
[L_AMT0] => 75.55
[METHOD] => SetExpressCheckout
[VERSION] => 72.0
[USER] => ****
[PWD] => ****
[SIGNATURE] => ****
[BUTTONSOURCE] => Magento_Cart_Community
)
[response] => Array
(
[TIMESTAMP] => 2015-06-25T12:22:42Z
[CORRELATIONID] => b9eeaea2f446
[ACK] => Failure
[VERSION] => 72.0
[BUILD] => 17159089
[L_ERRORCODE0] => 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.
[L_SEVERITYCODE0] => Error
)
[__pid] => 26085
)
and here the debug from the old storeview:
(
[url] => https://api-3t.paypal.com/nvp
[SetExpressCheckout] => Array
(
[PAYMENTACTION] => Authorization
[AMT] => 107.80
[CURRENCYCODE] => CHF
[RETURNURL] => ...
[CANCELURL] => ...
[INVNUM] => 100000262
[SOLUTIONTYPE] => Mark
[GIROPAYCANCELURL] => ...
[GIROPAYSUCCESSURL] => ...
[BANKTXNPENDINGURL] => ...
[LOCALECODE] => de_CH
[ITEMAMT] => 92.50
[TAXAMT] => 7.99
[SHIPPINGAMT] => 7.31
[L_NUMBER0] => LE-PANEL595-40-CW
[L_NAME0] => ...itemname...
[L_QTY0] => 1
[L_AMT0] => 92.50
[BUSINESS] =>
[NOTETEXT] =>
[EMAIL] => [email protected]
[FIRSTNAME] => asdf
[LASTNAME] => asdf
[MIDDLENAME] =>
[SALUTATION] =>
[SUFFIX] =>
[COUNTRYCODE] => CH
[STATE] =>
[CITY] => asdf
[STREET] => asdf
[ZIP] => 1111
[PHONENUM] => 11 111 111
[SHIPTOCOUNTRYCODE] => CH
[SHIPTOSTATE] =>
[SHIPTOCITY] => asdf
[SHIPTOSTREET] => asdf
[SHIPTOZIP] => 1111
[SHIPTOPHONENUM] => 11 111 111
[SHIPTOSTREET2] =>
[STREET2] =>
[SHIPTONAME] => asdf asdf
[ADDROVERRIDE] => 1
[METHOD] => SetExpressCheckout
[VERSION] => 72.0
[USER] => ****
[PWD] => ****
[SIGNATURE] => ****
[BUTTONSOURCE] => Magento_Cart_Community
)
[response] => Array
(
[TOKEN] => EC-1TY898842U856944H
[TIMESTAMP] => 2015-06-25T12:59:46Z
[CORRELATIONID] => a456de03a7b81
[ACK] => Success
[VERSION] => 72.0
[BUILD] => 17159089
)
[__pid] => 27391
)
There are alot of infos that are missing in the new storeview. But the problem is the rounding
Edit I said the shipping cost are not passed to paypal in the new store view. Thats wrong, the shipping costs are there [SHIPPINGAMT] => 6.64
.
It is a rounding problem: [ITEMAMT] => 75.55
+ [TAXAMT] => 15.62
+ [SHIPPINGAMT] => 6.64
= 97.81, but [AMT] => 97.80
. So that is the problem. I have read about some rounding problems in 1.7, but we use Magento Version 1.9.0.1. I will search for other similar problems now.
P.S. Our prices includes taxes.