-
Notifications
You must be signed in to change notification settings - Fork 213
Add 'get_supported_currencies' function for klarna #3378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@james-allan I have requested your review here as you have the most knowledge in Klarna. As you had fixed the previous issue #3108, you are the best person to save me from creating any regression. 🥺 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on this @Mayisha. The super detailed function comment is really nice at explaining the various scenarios. It should help us understand how it currently works and where problems might be if our understanding is incorrect.
Based on scenarios outlined in the comment and my understanding of Klarna requirements I tested the following matrix of set ups and customer situations:
Acc | Store Currency | Customer location | Klarna offered (👍) |
---|---|---|---|
🇺🇸 | US | US | Yes (👍) |
🇺🇸 | US | AU | No (👍) |
🇺🇸 | AU | AU | No (👍) |
🇺🇸 | AU | US | No (👍) |
🇦🇺🐨🦘 | AU | AU | Yes (👍) |
🇦🇺🐨🦘 | AU | US | No (👍) |
🇦🇺🐨🦘 | EUR | FR | No (👍) |
🇦🇺🐨🦘 | EUR | AU | No (👍) |
🇫🇷 | EUR | FR | Yes (👍) |
🇫🇷 | EUR | Germany | Yes (👍) |
🇫🇷 | EUR | Greece | Yes (👍) |
🇫🇷 | EUR | UK | No (👍) |
🇫🇷 | EUR | Switzerland | No (👍) |
🇫🇷 | EUR | US | No (👍) |
🇫🇷 | NOK | Norway | Yes (👍) |
🇫🇷 | NOK | FR | No (👍) |
🇫🇷 | AU | AU | No (👍) |
🇫🇷 | AU | FR | No (👍) |
🇬🇧 | GBP | GB | Yes (👍) |
🇬🇧 | GBP | FR | No (👍) |
🇬🇧 | GBP | US | No (👍) |
🇬🇧 | AU | AU | No (👍) |
🇬🇧 | AU | GB | No (👍) |
🇬🇧 | NOK | NO | Yes ( |
⚠️ This case I wasn't 100% sure but they work and appear correct based on the final case listed in the advanced rules of EEA countries.- 👍 Indicates that the expected outcome occurred.
- Bolded rows are the outcomes where Klarna was shown to customers on the checkout - every other case was hidden.
Thank you @james-allan for testing so many scenarios and documenting them 💯 |
Fixes #3351
Changes proposed in this Pull Request:
Added
get_supported_currencies
for Klarna which returns the list of supported currencies based on the Stripe account currency.Testing instructions
develop
branch notice that Klarna is displayed. When you select it, the Payment Element isn't displayed. The following error shows up in the browser console.