#demoox-element-php
1 messages · Page 1 of 1 (latest)
We recommend using the payment element to collect payment info and charge the customer if they don't already have a saved card. We demonstrate this flow in this guide: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Yes I know the payment element but I'm talking about the card element and the fact that I can't display it with the sample found on Github
Ah ok. Sorry I misunderstood what you were saying
What's the error?
Do you see anything in the browser console?
No problem sorry for my English...
Yes I looked at the console and it doesn't have an error, it's just that it doesn't show up...
Interesting. Nothing is displayed in the console at all? Did you just copy the code over as is or did you modify it?
I didn't change anything I took the code as is from https://github.com/stripe-samples/charging-a-saved-card/
and on the console there is no error except, I trigger the button, obviously
Interesting. That code is also hosted live here: https://lbbjp.sse.codesandbox.io/
Does the same thing happen for you there?
I may be expressing myself badly...
I put as a php condition with a simple "IF" that the list of user cards is displayed if he has saved cards. which it is, it works like the link you just sent.
However, if he has no registered card, the card-element should be displayed, you understand?
But the element is not displayed
demoox-element-php