odoo/odoo#191175
Created by fw-bot
Merged
at 7197f166b1401d79de21db2d8b37ca1cf979023f
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:saas-17.4-17.0-opw-4191877-mercado_pago_currency_rounding-sile-n8mV-fw
- head
- 3370dc73b0e90280dbe8c12851c0584ec6148de9
- merged
- 10 months ago by Bugfix, Levi Siuzdak
odoo/odoo | |
---|---|
17.0 | #185664 |
saas-17.2 | #191084 |
saas-17.4 | #191175 |
18.0 | #191191 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #191214 |
[FW][FIX] payment_mercado_pago: round payment tx amounts for COP, HLN & NIO
Versions
- 17.0+
Steps
- Use COP, HLN or NIO as currency;
- create a SO or invoice with a non-integer amount total;
- create a payment link;
- pay using Mercado Pago.
Issue
> Error processing payment
> Prices in COP currency must be expressed with integer values
Cause
Our currency defaults follow the ISO 4217 standard for minor units. For three currencies (COP, HLN & NIO), Mercado Pago only accepts integer amounts instead of the standard 2 decimals, resulting in a failed payment transaction.
Solution
In the payload sent to Mercado Pago, round the amount down if it uses one of the affected currencies.