#gabrielsilva1910
1 messages · Page 1 of 1 (latest)
Hello
As the error states, you shouldn't be handling card details on your server at all
You should be creating Tokens or ideally confirming PaymentIntents client-side instead.
Can you tell me more about what you mean by:
I need help because my customers are not selling With credit card
https://stripe.com/docs/js/tokens_sources?type=cardElement
I'm using this document to generate on the client side, but some options change my layout and I don't want to change my layout, can I show an example to generate this token without changing my layout
I want to say I need help
You should be able to style your Card Element to match your layout: https://stripe.com/docs/js/elements_object/create_element?type=card#elements_create-options-style
Is all this just to generate a token? I just want to generate the token, isn't there the option of calling JS to pass the card data and generate the token?
Yes that is what the above does
Really though why are you using this flow at all
What you want to do is create a PaymentIntent on your server, pass the client secret to your client and then use confirmCardPayment() with Card Element
I'd recommend taking a look at the quickstart here: https://site-admin.stripe.com/docs/payments/card-element
That has a code example of what this should look like.
ok, I'll give the doc another read, thanks for your attention
Sure