fix: auto pick country in 1 country regions
This commit is contained in:
1 parent
ec2728bbd5
commit
d11eb8fa65
2 files changed
+13
-6
No files matched your search
@@ -135,9 +135,11 @@ class KlarnaProviderService extends PaymentService {
|
||||
}
|
||||
|
||||
// TODO: Check if country matches ISO
|
||||
if (!_.isEmpty(cart.billing_address) && cart.billing_address.country) {
|
||||
order.purchase_country =
|
||||
cart.shipping_address.country_code || cart.billing_address.country_code
|
||||
if (
|
||||
!_.isEmpty(cart.shipping_address) &&
|
||||
cart.shipping_address.country_code
|
||||
) {
|
||||
order.purchase_country = cart.shipping_address.country_code
|
||||
} else {
|
||||
// Defaults to Sweden
|
||||
order.purchase_country = "SE"
|
||||
|
||||
Reference in new issue
Block a user