#samsara-paymentelement-error
1 messages ยท Page 1 of 1 (latest)
๐ @old scroll for next time it's a lot easier if you just keep the same thread instead of having to reopen one
I'm not entirely sure I understand the question here either
samsara-paymentelement-error
Hi Koopa, thank you. This is a different question so I opened up a new thread, would you prefer I keep the same one?
To give context, I have the stripe payment element, and when I call stripe.confirmPayment, I can either get back a paymentIntent, or an error, like so:
const { paymentIntent, error } = await stripe.confirmPayment({
elements,
confirmParams: {
return_url: `${window.location.href}`
},
redirect: 'if_required'
});
The error will tell me info about the cause of the error based on various scenarios. I'm wondering if there's some resource I can find about this particular error message:
code: "incomplete"
message: "Please fill in your card details."
type: "validation_error"
I noticed it happens when a user opens up the apple pay modal and then clicks out of it, but I'm wondering if there are any cases I can expect this error to be thrown by stripe?
yeah for next time, just keep the same thread if it's still open
What happens if you call confirmPayment() without entering a card number? What have you tried overall?
The form won't submit without entering a full credit card/ valid card format. Can't test google pay scenario right now since it's not showing up in prod but I'll work on fixing that later. So I don't know if there is any other scenario except maybe from closing the google pay modal without clicking okay and submitting payment
Oh wait sorry
I don't think we have an exhaustive list of all scenarios. Mostly if there's an error you would display the error message
I get this error code
code: "incomplete_number"
message: "Your card number is incomplete."
type: "validation_error"
Is there any way to block form submission if no valid credit card number has been entered?
Ah okay thanks
Sweet thanks koopa
sure!
So...apparently google pay isn't showing up for me I think due to a local reason, since I went to https://stripe.com/docs/payments/payment-element and didn't see it as an option
Do you know what I could do to troubleshoot? I am logged in and have verified payment methods associated with my google account
are you using HTTPS when testing?
I'm talking about it not showing up https://stripe.com/docs/payments/payment-element here I think it's working in our app because it shows up for my colleagues
But not for me personally
what do you see on that page exactly though?
All the other payment options except google pay...card, affirm, klarna, afterpay, cash app, us bank acct, wechat pay
https://stripe.com/docs/stripe-js/elements/payment-request-button what do you see here
just pay with link
okay so I think that's why, you likely used/tested Link
try removing all your cookies, or at least all the Stripe cookies and then reload the page
okay sweet
let me know if that works
That worked! Thanks koopa
yay!
๐ it's really hard to follow you. What exactly do you see on that page
Just the pay with link button
please share an exact picture
Then can you look at chrome://serviceworker-internals/ and cmd+F for https://pay.google.com/gp/p/service_worker.js and see if you get a match
Okay so it seems like something changed with Google Chrome and we don't know what yet. It looks like the "service worker" used for Google Pay sometimes disappear for some people and there's no way to recover