#Himanshu Mukhedkar-
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
could you please describe what the issue is? the screenshot is not very helpful yet
Geeting this error on Console IntegrationError: Invalid value for confirmCardPayment: payment_method.card should be an object or element. You specified: null.
We are getting correct value in elements initially, but later on it is getting Null after clicking Paynow Button
If you want I will share a public URL to reproduce issue at your end @vague totem
yes that would be helpful thanks
Here is the link: https://registration.staging-env.shoptalkeurope.com/form?token=ysoKW6kY1SPyJW9ASqfbsd7tyR7737kBnBR7t6UoHTxKyv1RHy1vT2bCiXix3IJ87RDM000byE0LZ80z4hrUGA%3D%3D
let me know what is the solution for this.
because I'm not getting why it is failing only on staging and Prod Env.
Thanks!
๐ Did you try what I suggested yesterday?
Will raise a Ticket for Stripe Support shortly, Meanwhile can you pls let me know about a possible solution for the same.
This is what I suggested yesterday: #978549299522711562 message
You mean to say do like this:
confirmCardPayment(clientSecret, {
payment_method: {
card: CardElement,
},
card: cardElement
Okay I'll try this locally.
Do i only need to do this in my code:
stripe .confirmPayment(clientSecret, { payment_method: { card: cardElement`,
},
})
.then((res) => {
console.log(res , "res");
if (
res &&
res.paymentIntent &&
res.paymentIntent.status &&
res.paymentIntent.status === "succeeded"
) {
getConfrimationDetails();
setIsLoading(false);
}
if (res && res.error) {
setIsLoading(false);
addToast(res.error.message, {
appearance: "error",
autoDismiss: true,
});
}`
and Rest of the code is good.
and FYI I'm using this version:
"@stripe/react-stripe-js": "^1.6.0", "@stripe/stripe-js": "^1.21.1",
Do i need to update this as well
Shouldn't be necessary
Okay I'll try with replacing stripe.confirmCardPayment with stripe.confirmPayment
You should charge the card parameter to cardElement
I pasted the code for you yesterday
Otherwise if that doesn't help, you'll need to write in so we can spend time take a deeper look
But we are not getting element object here,
.confirmCardPayment(clientSecret, {
payment_method: {
card: elements.getElement(CardElement),
},
Do you think will that work.
card: cardElement
Anyways I'm getting error while using this cardElement is not defined, because we are using CardElement.
<CardElement id="payment-element" options={{ hidePostalCode: true }} />
What's the error?
cardElement was not defined
Can I ask you write in to support like I did yesterday? If you can provide us with as much context and code as possible, we can work to resolve the issue for you
Sure We have talked with the support person, and they said We mail you and get back to you.
If you want I will share the public URL of Staging Env to debug at your end.
then like they say, we'll get back to you
your ticket is on my team's queue right now
someone will look and get back when we can
Basically
const elements = useElements();
This element is getting null after initially render that's causing the problem.