Closed amolood closed 6 years ago
Can you explain why you think the sdk needs this functionality?
Right now, if there is no card number present, it defaults the security code length to 3 (as all but American Express have security codes of length 3). When an American Express card is detected, it automatically sets the max length to 4.
IF someone want to use it with local payment gateway like i do , the length of ccv code is 4
Can you explain that a little more?
The payment gateway wouldn't matter since those card types are defined in this library. There are no external dependencies notifying android-card-form for the CVV length.
We have defined card types that know their CVV length. We wouldn't want CVV length set to any length except what the card type tells us. So allowing the consumer to update it dynamically doesn't make sense for CVV length.
I think we need more detail on the problem we're trying to solve in this PR. I'm going to close this for now. If you can give us a more detailed use case we can help guide you to submitting a PR to fix the problem!
@crookedneighbor I'm form sudan , in sudan we have local card Like "Visacard" but local and the length of the ccv is 4 , so i hope we can use this library , and set the card icon + ccv length
I think for your use case, you would be better served to use your fork of the repo and edit the Card Type file https://github.com/braintree/android-card-form/blob/ab72e02ae81cd5229598abf49cb39a5d2bcfd57a/CardForm/src/main/java/com/braintreepayments/cardform/utils/CardType.java
Update to set ccv length from any where :)