stripe-react-native
stripe-react-native copied to clipboard
Setting card params programatically
Is your feature request related to a problem? Please describe. I would like to use a card scanner to enter card details into a CardField, specifically on ios. It's something our customers have requested.
Describe the solution you'd like A method on CardField ref that allows me to set the card params programatically.
It would also be cool if you made a react native component for stripes ios scanner, but I understand that it's probably not a priority.
Describe alternatives you've considered I can patch it myself, but it adds extra work when I have to update the package in the future. I have looked at the payment sheet that has the card scanner built in, but it unfortunately doesn't fit our use case in other regards.
@arekkubaczkowski is even for just the "ref" it is needed to be implemented in stripe-ios first ?
+1
Use case:
- Our QA process involves testing a wide range of cards as provided at https://stripe.com/docs/testing (ie. Mastercard debit, Visa credit card, card that fails with incorrect_cvc, etc.)
- Instead of having to manually enter the 16-digit card number, expiry date, and cvc every time, it would be nice to have a dev tool containing a list of cards with the card details from fixture data so that a QA user can easily select a card and test its outcome.
- A dev tool like this would require the ability to set the card details programmatically
Another use case:
- Hide the
CardFieldand use a custom UI over it
Yes, the combination of card scanner feature and CardField component could be useful for our solution too. Do you have any plans about it?