I have integrated @stripe/stripe-react-native in my app which is working fine is happy scanarios.
<CardField
postalCodeEnabled
placeholder={{
number: CLAUSE.CARD_NUMBER,
}}
cardStyle={styles.cardStyle}
style={styles.containerStyle}
onCardChange={info => setCardData(info)}
/>
The problem I am facing is with invalid expiry year and zip code. If I enter expiry year that is smaller than current year i.e 23 and below, the text becomes red demonstrating that I have entered invalid year which is correct.
But when I enter invalid year that is in upper limits like 80 or above, then UI text doesn’t become red and info returned denotes valid expiry year but when I execute payment stripe payment fails giving me “Invalid attributes” error.
Card info response:
{"brand": "Visa", "complete": true, "expiryMonth": 12, "expiryYear": 85, "last4": "4242", "postalCode": "11111", "validCVC": "Valid", "validExpiryDate": "Valid", "validNumber": "Valid"}
You can see that expiryYear is 85 but validExpiryDate is true.
Similarly for zipcode, zip code is acceptable irrespective of number of characters I enter.