Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Pre-fill card number, cvc and expiration #66

Closed
rheilgm opened this issue May 23, 2017 · 6 comments
Closed

Pre-fill card number, cvc and expiration #66

rheilgm opened this issue May 23, 2017 · 6 comments
Assignees
Labels

Comments

@rheilgm
Copy link

rheilgm commented May 23, 2017

is it possible to pre-fill those fields automatically?
say for example:

@itsmepetrov
Copy link
Contributor

itsmepetrov commented May 23, 2017

Hi @rheilgm, currently stripe.paymentRequestWithCardForm does not support pre-fill card params.

But you can use your own view with <PaymentCardTextField /> which support setup initial params.

To set inital params you can use <instance>.setParams(params) method which is available via ref. For example, if you’re using another library to scan your user’s credit card with a camera, you can assemble that data into an object and set this property to that object to prefill the fields you’ve collected.

@itsmepetrov itsmepetrov self-assigned this May 23, 2017
@balesz
Copy link

balesz commented May 26, 2017

Hi @itsmepetrov,
Sadly the PaymentCardTextField can't set initial params on Android. No setParams function in PaymentCardTextField.android.js. Please add setParams support to Android too! Thanks a lot.

@itsmepetrov
Copy link
Contributor

Hi @balesz

Yes, PaymentCardTextField on Android currently does no support setParams, but we have plan to replace CreditCardEntry with the official input widget and also add support for setParams.

@rheilgm
Copy link
Author

rheilgm commented May 28, 2017

@itsmepetrov thanks for the info
yeah figured out i have to use for this, but i really like that card animation on stripe.paymentRequestWithCardForm :)

will it be possible to support this kind of feature in future releases?

@itsmepetrov
Copy link
Contributor

@rheilgm

As I said in the previous issue #17:

We use STPAddCardViewController from Stripe iOS API for drawing this view and we can change only those parameters which are provided by Stripe API.

Unfortunately, STPAddCardViewController does not support to pre-fill card fields. It has ability to specify prefilledInformation field, which can contain only email, phone and billingAddress.

To support pre-fill card fields we will need to write our own AddCardViewController, but we do not have plans for that in the near future.

@itsmepetrov
Copy link
Contributor

@rheilgm

I think the better way is to create the same issue in stripe-ios. If the Stripe team adds support for this kind of feature, then we can add it too without any problems.

Feel free to reopen this issue if you have any other suggestions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants