#Josh
1 messages · Page 1 of 1 (latest)
We are using API version: 2020-08-27
Are you using the Card Element? https://stripe.com/docs/payments/accept-card-payments?platform=web&ui=elements
Yes, i believe so
Are you sure the "postal code" field comes from Stripe?
Can you share your code that creates this page?
var elements = await loadPaymentElements();
window.StripeElement.createElements(elements);
async function loadPaymentElements() {
// Load stripe.
window.StripeElement = await new StripeElement(window.stripePublicKey);
// Create stripe payment elements.
elements = [
{
type: 'cardNumber',
selector: '#payment_card_number',
},
{
type: 'cardExpiry',
selector: '#payment_card_expiry',
},
{
type: 'cardCvc',
selector: '#payment_cvv',
},
{
type: 'postalCode',
selector: '#payment_postcode',
},
];
return elements;
}
Does this help?
Apologies I am still quite new to this project and working with stripe, if i misunderstood anything please let me know
Taking over here, any particular reason why you're using the Card Element and not Payment Element?
Apologies, no I'm not sure, I'm picking up on this issue from another dev and don't have much background with Stripe!
AFAIK, the postalCode Element is completely deprecated since the Card Element collects the ZIP/postcal code automatically
OK, my main question is it possible to change the default placeholder card info that is displayed in the original screengrab - do you know if this is possible to change to a UK card example?
Let me check. As I said, postalCode Element is deprecated so it's not documented anywhere
I believe this is localised according to the BIN of the card, you can't overwrite it
Alternatively just roll your own field for postal code collection and pass it to confirmCardPayment. You don't need to use our Element
OK thanks