Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow For Number/Expiry/CVC Population programmatically #934

Closed
mashaalmemon opened this issue May 10, 2022 · 4 comments
Closed

Allow For Number/Expiry/CVC Population programmatically #934

mashaalmemon opened this issue May 10, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@mashaalmemon
Copy link

Is your feature request related to a problem? Please describe.

Our developers and our testers often have to enter a credit card in. In sandbox/development mode we have specific test card information that we must enter (as provided by stripe here) in order to try specific scenarios. Currently, due to the fact that there is not means by which to populate the Number/Expiry/CVC fields programatically, we need to type in test cards by hand.

Describe the solution you'd like

It would be great if the CardField component had means by which we could programatically populate the card field with one of these test cards programatically.

Essentially if there was a value field exposed that perhaps took an object and then took the date in and performed validation immediately (to obviously not allow luhn check failures or expiry dates that are before the current date), this would be perfect. Once the value is populated I assume the user of the app would be able to type/modify the populated number if necessary.

All other functionality of CardField would remain the same.

Describe alternatives you've considered

Cut/paste works fine on iOS but does not work on Android. This is what we've been doing in order to save us time/effort in lieu of this capability.

Additional context

Likely the requested feature is pretty clear. Should you need any additional clarity, please let me know.

@charliecruzan-stripe
Copy link
Collaborator

charliecruzan-stripe commented May 10, 2022

Thanks for the request! Hm, so you'd set a value just for manual test environments? We can keep this open as an enhancement and see if there's a desire for it, but this probably won't be prioritized for now since the use case is pretty specific

@charliecruzan-stripe charliecruzan-stripe added the enhancement New feature or request label May 10, 2022
@mashaalmemon
Copy link
Author

Got it. Thanks @charliecruzan-stripe . After I created this, I noticed a similar request in #637 . Also note, our use case is in QA and in development of payment flows that use the CardField component.

When testing the developer has to also enter some card into the form (test cards typically), many many many times per day. This capability would make it much easier to work with the component.

@charliecruzan-stripe
Copy link
Collaborator

hm you're right, it might be better to close this and add your context to that other issue

@charliecruzan-stripe
Copy link
Collaborator

closing in favor of #637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants