#chern
1 messages · Page 1 of 1 (latest)
Hi there, the card scanning is a separate componnet, so technically you can use it outside PaymentSheet, you may want to have a try
Android-> https://github.com/stripe/stripe-android/tree/master/stripecardscan
iOS -> https://github.com/stripe/stripe-ios/tree/master/StripeCardScan
Thanks! Can we have access to these features with stripe-react-native sdk? Or should we create the custom wrapper modules?
I'm afraid that card scanning is not exposed in stripe-react-native API (https://stripe.dev/stripe-react-native/api-reference/index.html), so you need to build your own wrapper
Ok, if we will create the wrappers, will it be possible to pass the scanning result data to the CardField component from stripe-react-native?
Yes. For example in Android there's a setCardNumber method in CardInputWidget (https://stripe.dev/stripe-android/payments-core/com.stripe.android.view/-card-input-widget/set-card-number.html)
Ok, got it thanks a lot!
No problem. I believe there's something equivalent in iOS, which you can find in https://stripe.dev/stripe-ios/documentation/stripe/
Just another small question. You are providing the links to the native platforms docs. But this is what we have for stripe-react-native CardFieldInput available methods https://stripe.dev/stripe-react-native/api-reference/interfaces/CardFieldInput.Methods.html
Documentation for @stripe/stripe-react-native
It's only blur, focus and clear
Not all native functions are surfaced in stripe-react-native SDk
So it means we can't set the data in CardField programmatically 😦
Not directly through stripe-react-native SDK, you might need to build your own bridge or wrapper.
It's sad. But anyway thanks for your help!