#sushbhat

1 messages · Page 1 of 1 (latest)

dreamy epochBOT
next tusk
#

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

brisk tulip
#

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

next tusk
#

The ZIP field would be removed from the UI if it was a Chinese BIN

brisk tulip
#

you mean if I enter a chinese card number will this field be removed

#

its still showing

next tusk
#

Which test card are you using?

brisk tulip
#

China (CN) 4000001560000002 Visa

#

tried this also
India (IN) 4000003560000008 Visa

next tusk
#

Then I guess the zip field is still present, its just not required

#

Not sure what your Q is

brisk tulip
#

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

next tusk
#

Ok, but what's the actual issue/error?

brisk tulip
#

It says zip code is needed

next tusk
#

Can you share the code that initialises your Payment Element instance?

brisk tulip
#

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');

next tusk
#

The country field won't automatically update to reflect the card number