#bartpowergo_22711

1 messages · Page 1 of 1 (latest)

karmic patioBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

wicked imp
#

Hey there

#

We can't re-open threads but if you summarize your issue here then I'm happy to help.

little kernel
#

Sure: we noticed a regression with stripe.js API. We are use stripe. .createPaymentMethod({type: "card", card: cardNumeberElement, ...)

It's been working fine since this morning when it started to return an error saying that the card expiration date was not complete. On further inspection, we noticed that the card expiration and cvc were no longer being sent to Stripe (these are separate stripe elements created beside the card number element).

Looking a the Stripe dashboard request logs, we noticed that it started issuing this error when the stripe user agent version number changed from stripe.js/c973c0a0ca; stripe-js-v3/c973c0a0ca; split-card-element

to

stripe.js/47da200755; stripe-js-v3/47da200755; split-card-element

#

We implemented a work around by passing a cardElement (req_io0KKS4rANDeg8) and it worked.

We are wondering why cardNumber is no longer working.

wicked imp
#

Thanks for the details.

#

Let me see if I can repro real quick

#

Would also help if you would share the relevant client-side code here.

little kernel
#

The code is scattered around a few components but here are the bits that have been working for the past year but are no longer working:

            return this.stripe
                .createPaymentMethod({
                    type: "card",
                    card: this.card_information.cardNumber,
                    billing_details: {
                        name: this.card_information.fullname,
                        address: {
                            city: this.card_information.city,
                            country: countryCode,
                            line1: this.card_information.address,
                            line2: null,
                            postal_code: this.card_information.zip,
                            state: stateLabel
                        },
                        email: this.card_information.email,
                        phone: this.card_information.phone
                    }
                })
#

The elements are created like this:

        this.cardNumber = this.stripeElements.create("cardNumber", {
            classes: elementClasses,
            style: style
        });
        this.cardNumber.mount("#cardNumber");
        this.cardExpiry = this.stripeElements.create("cardExpiry", {
            classes: elementClasses,
            style: style
        });
        this.cardExpiry.mount("#cardExpiry");
        this.cardCvc = this.stripeElements.create("cardCvc", {
            classes: elementClasses,
            style: style
        });
        this.cardCvc.mount("#cardCvc");
#

stripeElements being stripe.elements()

#

From the log we see, the card expiration and the cvc are not sent to the Stripe API. But we do see that when we fill the card expiration and cvc, the is-complete class is added to the DOM elements.

wicked imp
#

Hmm okay give me a sec longer

#

Hmm okay when I do something similar it works just fine for me

little kernel
#

Is it using the same JS version as us? Because it was working yesterday and stopped working out of the blue. The only difference we see is the user agent.

wicked imp
#

The only way I'm able to reproduce something like that is if I literally don't render my Card Expiry and CVC Elements

#

Yeah I'm pulling the latest version of Stripe.JS

#

Are you sure something isn't dismounting those Elements just before your submission?

#

Have you set any break points in your tests?

little kernel
#

Our JS code is the same deployed version in production, but that's something we can take a closer look at.

wicked imp
#

Yeah overall this would be a huge issue if something like this changed/broke and we would hear it from many merchants.

#

I really think there is likely a bug somewhere hidden on your end where something is unexpectedly messing with the DOM

little kernel
#

Ok, thank you for confirming, we'll investigate more.