ZEODE
New Member
I noticed percentage discount coupons would cause failure at checkout, with PayPal (Legacy) rejecting the transaction. I am also using your Cart plugin.
On debugging with browser dev tools I was able to diagnose rounding errors, which meant the totals sent were rejected by PayPal as it didn't match their expected rounded amount.
Percentage discounts produced amounts with 3-decimal values (e.g. 9.995), but PayPal requires 2-decimal currency values, causing “invalid amount” errors.
Fixed-amount discounts are applied only to the order total, not distributed across item line prices, causing the sum of item amounts to differ from the order total and triggering PayPal “total mismatch” errors.
I tested initially by editing your original files in RMMarketplace addon, but have since created a class extension to fix the issue for me rather than edit the original files and deal with the unexpected contents nag. Happy to share my edits if required.
On debugging with browser dev tools I was able to diagnose rounding errors, which meant the totals sent were rejected by PayPal as it didn't match their expected rounded amount.
Percentage discounts produced amounts with 3-decimal values (e.g. 9.995), but PayPal requires 2-decimal currency values, causing “invalid amount” errors.
Fixed-amount discounts are applied only to the order total, not distributed across item line prices, causing the sum of item amounts to differ from the order total and triggering PayPal “total mismatch” errors.
I tested initially by editing your original files in RMMarketplace addon, but have since created a class extension to fix the issue for me rather than edit the original files and deal with the unexpected contents nag. Happy to share my edits if required.
Last edited: