#nicholaspuglia_unexpected
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1235844196556865536
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! give me a while to take a look
so for the onChange event, it only checks if the fields are completed, not if it's changed. So the fields are still complete when you copying and pasting a new credit card number, or any of the other fields
if you want to display the surcharge fees to the customer, I suggest considering a two step confirmation flow instead : https://docs.stripe.com/payments/build-a-two-step-confirmation
That's strange when looking at the PaymentElementProps I can see a method called onChange which says it's triggered when data is changed
This onChange event is triggered on every keystroke but not when data is copy pasted into the field after already being completed
Based off our Stripe docs : The change event is triggered when the Element's value changes. The event payload always contains certain keys, in addition to some Element-specific keys.
Yes that's correct so if the cvc is 123 and I copy and paste a new cvc such as 456 I would expect the onChange to fire. It does not in my experience
I think my understanding of when the value changes, is when the value in the event changes, not the value in the field
But when you are typing the number out manually the event will get triggered on every keystroke. What value would be changing in that scenario?
that's not what i'm getting on my own sample project