#alexzada-Card Elements
1 messages ยท Page 1 of 1 (latest)
hello tarzan ๐
do you mean you want a multi-line form like in the second screenshot?
yep, i saw something about using the separate elements, but I couldn't find it inside the React Native SDK
well the easiest way is to use the PaymentSheet since that is mutiline by default and supports Apple/Google Pay and other payment methods. https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet
alternatively there is CardForm as a multi-line dropin form for just cards https://stripe.dev/stripe-react-native/api-reference/index.html#CardForm
I even implemented this form, but as we chose to use the synchronous form with completion on the server, I only used CardField because I don't know how to use PaymentSheet just to get the card details, and I also had another problem regarding the component's language, as I am in Brazil, I needed it to be in Portuguese, but in all the devices I tested, it was in English (PaymentSheet)
it definitely localises so you did something wrong there
I haven't seen it yet, I'll see it now
probably haha
usually it's because your own app is not localised
like in iOS your own app has to be have translations for the given language in order for it to work in the SDK(we have our own translations but they're only used when the app using the SDK is using that language)
I don't remember locating my app, in fact I don't even know how to do that
worked perfectly for what I need, thank you very much!
@wind lotus one more question, where can i see how to style the CardForm?
it takes a React Native ViewStyle object as the style parameter
but how would I change the color of the Card number label for example?
not sure , I haven't used this component myself
๐
I can try to look but it's too busy right now, I'd suggest experimenting with it and looking at the examples