#alexzada - Stripe Elements in React Native
1 messages ยท Page 1 of 1 (latest)
hello ๐
The only way I am familiar with is to use Stripe React Native:
https://github.com/stripe/stripe-react-native
Although I guess you could specify our iOS and Android libraries manually in your own RN project
But how could I use separate elements like this example: http://jsfiddle.net/ywain/whj357u9/, using stripe-react-native?
You mean like the example here with the <CardField> component?:
https://github.com/stripe/stripe-react-native#usage-example
I'm currently using this component, but I'd like to have more freedom to build my own layout using Stripe's components
what i currently have
how i wanted to leave
We provide details on our recommended approach but you are free to explore alternative approaches. What other fields do you want to use?
I would like to use the card number field, validity and security code, both separately
As far as I know, we do not expose those fields in our own React Native library: https://github.com/stripe/stripe-react-native/tree/master/src/components
Unfortunately this means I am not certain on how to help you further.
ok, no problem, thanks a lot for trying ๐
If you examine the CardField.tsx in our repo you may see how you could build your own components.
Is there a way to create a card token with some Stripe script that I could put in a custom component, or something like that?
I would review these component definitions to try and identify what code is being used.
OK, thank you!
I updated my version of stripe-react-native (it was at 0.2.0, I don't know why), and now it's giving this error, can you help me?
Okay, I suspect there were some breaking changes in the methods the RN SDK provides.
I would review the releases here:
https://github.com/stripe/stripe-react-native/releases
my code is based on this guide https://stripe.com/docs/payments/accept-a-payment-synchronously
And yep, we call out that method in Step 3.
found what was changed, thank you very much, you are amazing!
Is it okay that I'm asking so many questions here on discord?