You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an Omnipay based gateway (In our case PayPal, https://github.com/craftcms/commerce-paypal) we've encountered some problems when trying to process a payment with a different currency than the primary currency. For example the USD as primary and GBP as secondary. I've found out that when creating the item bags to send to the gateway, the price of the items are noted in the primary currency, while in the transaction object, the price is noted in the secondary currency. This results in the following error from the gateway: The totals of the cart item amounts do not match order amounts
I think the best way to fix this, would be to convert the price in the item bags to the currency that was selected as the paymentCurrency. (also see this related issue in commerce)
Steps to reproduce
In Craft Commerce, Add a primary and secondary currency with a different rate
Add some items in your shopping cart in the secondary currency
Proceed to checkout with the Paypal gateway
Additional info
Craft version: 3.6.17
PHP version: 8.0.7
Database driver & version: PostgreSQL 12.6
Plugins & versions:
Commerce: 3.3.4.1
Commerce Omnipay: 3.0.2
Commerce Paypal: 3.0.0
The text was updated successfully, but these errors were encountered:
Description
When using an Omnipay based gateway (In our case PayPal, https://github.com/craftcms/commerce-paypal) we've encountered some problems when trying to process a payment with a different currency than the primary currency. For example the USD as primary and GBP as secondary. I've found out that when creating the item bags to send to the gateway, the price of the items are noted in the primary currency, while in the transaction object, the price is noted in the secondary currency. This results in the following error from the gateway:
The totals of the cart item amounts do not match order amounts
I think the best way to fix this, would be to convert the price in the item bags to the currency that was selected as the paymentCurrency. (also see this related issue in commerce)
Steps to reproduce
Additional info
The text was updated successfully, but these errors were encountered: