tonioseiler / craft-commerce-wallee

Craft Commerce Payment Gateway for Wallee
Other
1 stars 0 forks source link

Currency conversion #5

Open spirigweb opened 2 months ago

spirigweb commented 2 months ago

Hi When making a payment, the total in the base currency is always used, not the converted order total. However, the correct currency is displayed.

E.G. The order total in euros is

In CHF this would be -14.89 CHF

15.84 CHF is displayed in the payment form.

In the order data, “paymentAmount” has the value 14.89 and “outstandingBalance” the value 15.84, which one is transmitted?

Are there any other parameters that need to be added to the payment form?

Bildschirmfoto 2024-09-24 um 15 10 00
spirigweb commented 2 months ago

Update: Its this value

$lineItem->setAmountIncludingTax(round($order->getTotal(), 2));

in CommerceWalleeService.php on line

I think this should be converted to paymentCurrency.

cmartinespinosa commented 1 month ago

Hi @spirigweb ,

We have updated the plugin to address the conversion bug. May I confirm something? You have two or more payment currencies, correct? EUR and CHF? The bug was related to this.

This fix is compatible with both Craft 4 and Craft 5.

Please let us know if it works for you now, and we can close the issue.

Thanks for the feedback,

Carlos Martin