stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

Setting card params programatically

Open Josefnm opened this issue 4 years ago • 3 comments

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.

Josefnm avatar Oct 08 '21 11:10 Josefnm

@arekkubaczkowski is even for just the "ref" it is needed to be implemented in stripe-ios first ?

lemettrepaul avatar Dec 17 '21 14:12 lemettrepaul

+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

colinmatthewlee avatar Apr 23 '22 04:04 colinmatthewlee

Another use case:

  • Hide the CardField and use a custom UI over it

neiker avatar Jul 13 '22 19:07 neiker

Yes, the combination of card scanner feature and CardField component could be useful for our solution too. Do you have any plans about it?

crechet avatar Jan 19 '23 08:01 crechet