#ironbeard-card-changes

1 messages ยท Page 1 of 1 (latest)

cedar solstice
#

Hello!

pine lintel
#

Heyo ๐Ÿ™‚

cedar solstice
#

I don't believe you'd get the same behavior by listening to the DOM element - is there a specific reason you're asking?

pine lintel
#

I'm messing around using hyperscript (hyperscript.org) instead of JS, which is an event driven scripting language, and I've been unable to find the right events to listen to. I understand this might be more of a hyperscript issue rather than a Stripe issue, just trying to get an idea of where the "change" event is coming from.

Does the card object send the "change" event?

cedar solstice
#

I think the card object is what's sending the "change" event, but admittedly I don't know a ton about how this all was implemented

pine lintel
#

Thanks, I'll stick around in case other questions come up another time. I always appreciated that Stripe had great dev support ๐Ÿ‘

cedar solstice
#

๐Ÿ™‚ happy to help!

pine lintel
#

Actually, now that I mess with it a bit (using the preview here: https://stripe.com/docs/payments/card-element), I'm not sure what kind of actions result in #card-error being filled with a message at all.

Am I missing something, or is #card-error not being used?

boreal tartan
#

we don't really fill it for you, it's your own code doing that

pine lintel
#

Hmm. So, for instance, when I only type in four numbers and tab to the exp date field, the four numbers turn red. Does Stripe send an event there with the message "Your card number is incomplete"?

I get that message if I submit the form, but I guess I'm trying to figure out if Stripe also sends the message when it turns the numbers red, or only on submit.

#

^ this is in reference to my implementation, not the one on your docs website

boreal tartan
#

No we don't, though you can use the .change

pine lintel
#

Ah, ๐Ÿ‘ okay, I think we're good here. Thanks for your time and patience ๐Ÿ™‚