Magento paypal rounding issue with Discount

懵懂的女人 提交于 2019-12-13 02:55:43

问题


I'm using magento 1.9.1.0, and HUF curency that has no cents. If i don't use discount there is no rounding error, but if i do use inside magento it calculates well:

But as soon as I try to use paypal to pay it i get the following error:

and I check the paypal button code i get this:
<img src="https://fpdbs.paypal.com/dynamicimageweb?cmd=_dynamic-image&amp;buttontype=ecshortcut&amp;locale=en_US&amp;ordertotal=5326.80&amp;pal=XXXXX" alt="Checkout with PayPal" title="Checkout with PayPal">

and the ordertotal is wrong! In the Order is 5327 while in the Paypal button is 5326.80. its 0.20 off. It should round up, with no decimals. And no matter what i set, if a discount is used the rounding is all ways off!

The locale is wrong as well, even thought Hungary is set as a locale in magento.

How can I fix this rounding issues?


回答1:


Very often, some magento tax configurations don't play nicely with discount rules - particularly where PayPal is involved.

Within SYSTEM > CONFIGURATION check config under SALES -> TAX is set to 'apply customer tax AFTER discount', and not before. This fixed the issue for me.

Magento have a great page on their knowledge base explaining all the tax/discount configurations which can cause rounding errors: http://www.magentocommerce.com/knowledge-base/entry/magento-ce-18-ee-113-tax-calc




回答2:


Have you tried to change the Mage_Core_Model_Store::roundPrice(), and set the round to 0 decimal places.



来源:https://stackoverflow.com/questions/28902138/magento-paypal-rounding-issue-with-discount

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!