#bartpowergo_22711
1 messages · Page 1 of 1 (latest)
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.
- bart-card-element, 26 minutes ago, 12 messages
Hey there
We can't re-open threads but if you summarize your issue here then I'm happy to help.
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
This request worked yesterday when we passed a cardNumberElement: req_p41u6wbneakNYj
This request did not pass today: req_0YkpXpxMljInMa
Reponse: {
"error": {
"code": "parameter_missing",
"doc_url": "https://stripe.com/docs/error-codes/parameter-missing",
"message": "Missing required param: card[exp_month].",
"param": "card[exp_month]",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_0YkpXpxMljInMa?t=1705510559",
"type": "invalid_request_error"
}
}
We implemented a work around by passing a cardElement (req_io0KKS4rANDeg8) and it worked.
We are wondering why cardNumber is no longer working.
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.
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.
Hmm okay give me a sec longer
Hmm okay when I do something similar it works just fine for me
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.
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?
Our JS code is the same deployed version in production, but that's something we can take a closer look at.
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
Ok, thank you for confirming, we'll investigate more.