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

Some Test Stripe cards are not working on Android with version ^8.0.0-beta.11 #701

Closed
sureshgurunath12 opened this issue Dec 2, 2020 · 4 comments
Labels

Comments

@sureshgurunath12
Copy link

We are using the stripe integration on our project, below is the version we are using.

"tipsi-stripe": "^8.0.0-beta.11",

We use for the card input on the form. "https://tipsi.github.io/tipsi-stripe/docs/paymentcardtextfield.html"

When using the PaymentCardTextField we are facing an issue that out of test cards provided from below link. 2223003122003222 and 6200000000000005 cards are not acceptable in android. It throws the validation error. It works fine on iOS.
https://stripe.com/docs/testing

Can anyone help in some insights why only these 2 test cards are not working on Android.

@sureshgurunath12 sureshgurunath12 changed the title Some Test Stripe cards are not working on Android with version Some Test Stripe cards are not working on Android with version ^8.0.0-beta.11 Dec 2, 2020
@imcyee
Copy link

imcyee commented Dec 2, 2020

This is because tipsi stripe is using 'com.stripe:stripe-android:10.4.6' in android build.gradle.
And the issue was fixed with stripe-android 14.5.0.
stripe/stripe-android#2465

@imcyee
Copy link

imcyee commented Dec 3, 2020

I guess you are using the paymentRequestWithCardForm, tipsi depends on creditCardEntry that has outdated regex.

You can replace that library by folking tipsi-stripe, then replace:
CreditCardEntry with my fork,
In your tipsi-stripe/android/build.gradle:

dependencies {
 ....
// remove  implementation 'com.github.tipsi:CreditCardEntry:1.5.1'
 implementation 'com.github.imcyee:CreditCardEntry:1.5.2'
}

All 2 series master card should work. But i didnt add unionpay regex (62xx card)

@imcyee
Copy link

imcyee commented Dec 3, 2020

Or you can use my fork. (Try to fork it, because it is an experimental branch of my experimental branch, and I am planning to make some changes to it and all added code is untested, use it with your own risk)

https://github.com/imcyee/tipsi-stripe/tree/experimental

Changelog:

  • Replaced android creditCardInput to official Stripe.CardInputWidget
  • Removed createTokenWithBankAccount
  • Bump stripe-android from 10x to 14.5
  • Fix invalid master card series 2, and UnionPay 67xx

Note:

  • Behaviour change: Previously, the done button will be disable, if any of the input is incomplete or wrong, now it will enable when the input is complete, but won't disable by itself if user makes any changes.

@imcyee
Copy link

imcyee commented Dec 23, 2020

Also found this library that solve this validation issue with latest Stripe SDK:
https://github.com/Agaweb/react-native-stripe

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