Comments (3)
So the issue I had was that if you initialize a card using that constructor, it'stype
is set to null
. card.validateNumber()
checks the card's type against defined lengths (15 in the case of Amex). If you have no type, it assumes you want the standard card length (16 for Visa's, Mastercard, and Discover). So in your example, it would most likely work if you called card.setNumber("4242 4242 4242 4242")
because it's a Visa with the length it's looking for. There is no setter for type
, type
is private so you cannot directly mutate it, getType()
just on the fly returns a type but never sets anything, so the only option is to create a new Card
and manually set the type
to card.getType()
once you know you have enough info for it to compute what the type actually is. Then validateNumber()
should return the correct result.
from stripe-android.
Hi, @Numan1617, thanks again for reporting this issue! I just wanted to note that your PR at #34 has been merged---did that resolved the problem for you?
from stripe-android.
Looks like this has been resolved -- if you're still experiencing this problem, feel free to reopen!
from stripe-android.
Related Issues (20)
- [Feature] Compose Native Views
- [BUG] Impossible to clone stripe-android GitHub repository on Windows HOT 2
- [BUG] Duplicate class org.tensorflow.lite HOT 3
- [BUG] Next Field isn't automatically focused in CardMultilineWidget
- [BUG] Duplicate class com.sumsub.sns:idensic-mobile-sdk HOT 2
- [BUG] Missing proguard/R8 rules when using `payments-core` only HOT 2
- Support PayNow method Android HOT 1
- Greek Localization Issue - Payment Sheet Not Displaying in Greek for Most Users HOT 1
- [BUG] Shipping Dagger code/dependencies
- [Feature] Customer sheet - only add card
- [BUG] App crash: IllegalStateException: Cannot locate windowRecomposer; View androidx.compose.ui.platform.ComposeView
- [allowsRemovalOfLastSavedPaymentMethod] for the stripe-react-native HOT 1
- [Feature] Support Maestro cards for google wallets HOT 3
- [QUESTION] Request for Assistance: Locating PaymentSheet Example Server Side Backend Implementation Code HOT 1
- [BUG] "PaymentOptionsViewModel should already exist" when using PaymentSheet.FlowController HOT 2
- [BUG] HOT 1
- [BUG] Illegal char <:> at index 51: com.example.online_tutor.app-mergeDebugResources-41:/values/values.xml HOT 3
- [BUG] Stripe Elements | Google Pay Integration forces "BR" Country code in v.20.43.0 HOT 2
- [BUG] V-Pay debit cards don't get imported with google wallets HOT 1
- [BUG] Wrong title "Front of identity card"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stripe-android.