When tax and invoicing is enabled, cannot process payments over 1,000 currency units
When tax and invoicing is enabled, cannot process payments over 1,000 currency units.
This is because the calculateTaxAmount javascript function does not deal with thousands separators. Can fail in a couple of ways:
Separator | Result | Example |
---|---|---|
<space> |
last < 1000 | 1 234.56 => 234.56 |
. | first group with decimal | 1.234,56 => 1.234 |
<other> |
first group, no decimal | 1,234.56 => 1 |
This is quite problematic because you can't even (without DB hacking) work around it by setting no thousands separator.
For Stripe specifically, this causes an issue "Credit Card Payment Error: This PaymentIntent's amount could not be updated because it has a status of requires_capture. You may only update the amount of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action." because it recognises the amount is wrong and tries to change it to the correct amount.
Edited by Francis (Agileware)