Skip to content

Allow For Number/Expiry/CVC Population programmatically #934

@mashaalmemon

Description

@mashaalmemon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions