stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.12k stars 981 forks source link

UnionPay marked as invalid on iOS #1759

Closed sumitmundra closed 3 years ago

sumitmundra commented 3 years ago

When entering a UnionPay card number (e.g 6200000000000005) on iOS the form mark it as invalid where on Android it is marked as valid

STPPaymentCardTextField().isValid Give invalid

SDK version : 21.2.1

Simulator Screen Shot - iPhone 8 - 2021-02-04 at 14 44 09

Summary

Code to reproduce

iOS version

iOS 13 and iOS 14

Installation method

cocoapods

SDK version

SDK version : 21.2.1 ## Other information
csabol-stripe commented 3 years ago

Thanks for the report @sumitmundra. This behavior should be specific to Stripe's test cards which are handled differently than live cards, but I have a fix for this that we'll include in the next release. In the meantime if you are interested in testing 19 digit UnionPay card support you can try 6205500000000000004

cythb commented 3 years ago

@csabol-stripe Hi, I have the same problem. Now is there a way for me to test the 16 digit UnionPay card?

cythb commented 3 years ago

I use this card to test 6205500000000000004, but I got this error: Xnip2021-02-10_15-25-44

csabol-stripe commented 3 years ago

Ah my fault @cythb I forgot that the test card number I shared above isn't enabled for all accounts :\ I'll look into finding a test card number that should work but this may have to wait until our next release

davidme-stripe commented 3 years ago

This is fixed in 21.3.0.