react-credit-cards icon indicating copy to clipboard operation
react-credit-cards copied to clipboard

Can Any body help me to use it with stripe js elements ?

Open wajahatmasood opened this issue 3 years ago • 1 comments

wajahatmasood avatar Oct 01 '22 05:10 wajahatmasood

Not sure what you are trying to achieve, since Stripe elements give their own components to use on a payment screen. I currently, do not have a proper repo set up with the correct client-server integration, but you could do the following.

If you have Stripe system set up, with the correct integrations on the server and the client, then you could see if you are able to the onChange or possibly even target the input elements using a ref. Then you may be able to get the card_number, card_expiry, and the card_cvv, to show it in the react-credit-cards component.

https://stripe.com/docs/js/element/events/on_change?type=paymentElement https://stripe.com/docs/payments/accept-card-payments?platform=web&ui=elements&html-or-react=react

One important thing to remember though is that this may be a bit more difficult since the purpose of Stripe Elements is to provide a secured tokenized form for a customer to enter their payment details.

Stripe.js tokenizes sensitive payment details within an Element without ever having them touch your server.

SeanCassiere avatar Oct 03 '22 05:10 SeanCassiere