Description
Describe the bug
Klarna payments in general are restricted to domestic transactions; however, there is one exception that is outlined in the current documentation:
If you’re based in the EEA, UK, or Switzerland, then you can transact with consumers across the EEA, UK, and Switzerland, provided the presentment currency matches the currency of the customer’s country. For example, a Swedish business can present in EUR to accept Klarna from a buyer in Germany.
However, due to existing validations in the code, the Klarna payment method is not available when using a presentment currency different from the domestic currency used in the country that was selected during the WooPayments onboarding process.
To Reproduce
- Connect your store to a Stripe account from a Klarna-supported European country that doesn't use Euro as their domestic currency (e.g. United Kingdom)
- Enable Klarna
- As a shopper, set the currency to EUR, add a product to your cart and proceed to checkout
- As the billing country, select one Klarna-supported country that uses Euro as their domestic currency (e.g. Belgium)
- Notice the list of payment methods
Actual behavior
Klarna is not available as an option in the Payment Methods list.
Screenshots
Checkout
Expected behavior
Klarna should be available as an option in the Payment Methods list, and the order should succeed when using it.
Additional context
This issue related to #8718, however while the linked issue is focused on hiding Klarna when the location conditions are not met, while this issue should take care of showing Klarna when both the location and currency conditions are met.
The validations that are preventing Klarna from being displayed are mainly these two, since they force to only show the payment method when the cart currency matches the WooPayments account currency:
woocommerce-payments/includes/payment-methods/class-upe-payment-method.php
Lines 173 to 195 in fa75540
woocommerce-payments/includes/payment-methods/class-upe-payment-method.php
Lines 229 to 239 in fa75540
One of the biggest problems that would need to be solved is to figure out if the solution can be implemented entirely in the backend, or if it would be required to also implement frontend changes.