#Josh

1 messages · Page 1 of 1 (latest)

vernal ingotBOT
dawn pine
#

Hi there!

#

What Stripe integration are you using?

worthy ore
#

We are using API version: 2020-08-27

dawn pine
worthy ore
#

Yes, i believe so

dawn pine
#

Are you sure the "postal code" field comes from Stripe?

#

Can you share your code that creates this page?

worthy ore
#

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

summer nacelle
#

Taking over here, any particular reason why you're using the Card Element and not Payment Element?

worthy ore
#

Apologies, no I'm not sure, I'm picking up on this issue from another dev and don't have much background with Stripe!

summer nacelle
#

AFAIK, the postalCode Element is completely deprecated since the Card Element collects the ZIP/postcal code automatically

worthy ore
#

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?

summer nacelle
#

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

worthy ore
#

OK thanks