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

Inconsistency between Android and iOS on validation state for CardField #895

Closed
giorgiofellipe opened this issue Apr 18, 2022 · 3 comments · Fixed by #958
Closed

Inconsistency between Android and iOS on validation state for CardField #895

giorgiofellipe opened this issue Apr 18, 2022 · 3 comments · Fixed by #958
Assignees

Comments

@giorgiofellipe
Copy link

giorgiofellipe commented Apr 18, 2022

Describe the bug
There is a inconsistency on validation state for CardField (state control which was added by #629).
You can see below what I got on onCardChange after typing only the first card number:

iOS:

{
   "brand":"Visa",
   "complete":false,
   "expiryMonth":null,
   "expiryYear":null,
   "last4":"",
   "validCVC":"Incomplete",
   "validExpiryDate":"Incomplete",
   "validNumber":"Incomplete"
}

Android:

{
   "brand":null,
   "complete":false,
   "expiryMonth":null,
   "expiryYear":null,
   "last4":null,
   "validCVC":"Invalid",
   "validExpiryDate":"Invalid",
   "validNumber":"Invalid"
}

To Reproduce
Steps to reproduce the behavior:

  1. Setup a screen with a CardField
  2. Type just the first digit of card number
  3. Log what you receive on onCardChange

Do it for both platforms and check results.

Expected behavior
All platforms should handle the state equally

@giorgiofellipe giorgiofellipe changed the title Inconsistency on validation state for CardField Inconsistency between Android and iOS on validation state for CardField Apr 18, 2022
@charliecruzan-stripe charliecruzan-stripe self-assigned this May 23, 2022
@AleCatSS
Copy link

AleCatSS commented Jun 22, 2022

Hello,

Is this ticket still active? It's marked as closed and merged but labelled 'in progress'.

In any case, I can still see an inconsistency between iOS and Android on the brand name:

after typing the first digit '4':

iOS
{"brand": "Visa", "complete": false, "expiryMonth": null, "expiryYear": null, "last4": "", "validCVC": "Incomplete", "validExpiryDate": "Incomplete", "validNumber": "Incomplete"}
Android
{"brand": "", "complete": false, "expiryMonth": null, "expiryYear": null, "last4": "", "validCVC": "Incomplete", "validExpiryDate": "Incomplete", "validNumber": "Incomplete"}

I tested on 0.12.0 and 0.13.1.

Thank you

@charliecruzan-stripe
Copy link
Collaborator

that is being tracked in #714

@wazirkhan786
Copy link

If you are using latest version of stripe-react-native then please add prop to CardField postalCodeEnabled={true} for android and false for ios . It will solve the issue

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

Successfully merging a pull request may close this issue.

4 participants