#sushbhat
1 messages · Page 1 of 1 (latest)
Why don't you try with an international test card? AFAIK the fields will be auto updated/set to reflect the country origin of the BIN of the card
ok, I mean if a user from China now needs to complete the payment what would be zip for him, as it not a required field in China
The ZIP field would be removed from the UI if it was a Chinese BIN
you mean if I enter a chinese card number will this field be removed
its still showing
Which test card are you using?
Then I guess the zip field is still present, its just not required
Not sure what your Q is
basically we have defaulted the country value in payment element to US (for some legal reasons) but user can be in other region, I am simulating a user from india/china card who doesn't have a valid zipcode asked in US region
Ok, but what's the actual issue/error?
It says zip code is needed
Can you share the code that initialises your Payment Element instance?
using ngx stripe
this.paymentElementOptions = {
defaultValues: {
billingDetails: {
address: {
country: countryCode //set country code from billing address
}
}
},
fields: {
billingDetails: {
address: {
country: 'never' //hide country dropdwon
}
}
},
wallets: {
applePay : 'never',
googlePay: 'never'
}
};
this.paymentElement = this.stripeElements.create('payment', this.paymentElementOptions);
this.paymentElement.mount('#payment-element');
The country field won't automatically update to reflect the card number