#alex24-paymentelement-error
1 messages · Page 1 of 1 (latest)
This error usually means that you haven't initialized/mounted a PaymentElement yet. Have you?
all good, no rush
The card elements are mounted on the page
Is there a page I can load to reproduce?
Are you using anything fancy like Angular or Vue.js and such
unfortuneately its all local docker at the moment
we use vue but im doing this in vanilla js and php
i have the elements mounted and they work
any chance you can quickly repro this on jsbin or jsfiddle?
you should be able to hardcode the pub key + client_secret
@kindred gust any luck?
Okay so you don't use PaymentElement at all though
you explicitly use the old card element, split in sub-fields
so you want confirmCardSetup() not confirmSetup()
so i copied some of this from a previous project where I was doing card payments
are you saying that the api is updated now?
https://stripe.com/blog/introducing-the-payment-element we shipped a brand new UI element
so yes, you're using the old approach. Works totally fine, but the code is different
ok
so instead of the elements i need to pass the client secret to that?
how would i have found that if I didn't reach out to you?
nm the link lol
the link is the blog post, all our docs have been updated to use the new flow already
ok
it's because you copy-pasted parts of an old project that you hit this bug
so im still integrating this, should i switch to that in this project?
Since its new?
yes absolutely
The other project is old, but it's active
so i probably need to revisit it as well then
it will make your life so much easier because it can handle any payment method over time
the other project does payments with google and apple pay too
so i assumed it would just drop in
well that's awesome.
Thank you so much. Big stripe fan.
Wish I could get access to the corporate card you guys are launching 🙂
thanks again for your help man, struggled with this for 2 days
I still think we could improve that error message so I'll flag
ok yea
of course, sorry for making you do an entire example I should have double checked that you understood my question :p