-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Visa cards? #55
Comments
Hi @PhilMDev, looking into your issue and I'm not able to reproduce the error. Would you be able to provide me with a test Visa card number so that I can try this out? |
I tried several numbers. But you should be able to see this using 4111111111111111. I've taken three screen shots:
I looked through your code and it appears that Visa allows something other than 16 digits. I played with your code a little to see if I could fix the issue and I couldn't. |
One other thing I just noted. When entering a Visa card number the routine adds a space after I enter the last digit. When I enter the MC number it doesn't. It stops after the 16th digit. And on the Visa number, if I backspace to delete the extra space it deletes the last digit! Thanks! |
Thanks for the examples! It seems like we do have something weird going on with the pre-formatting of Visa cards. This might be tied to the fact that we allow 19 digit Visa card numbers. If this is urgent, perhaps you can trim the user's input for now. WDYT? I can look into an elegant solution. |
Thank you for your response. It certainly is not urgent. For right now I just turned off the formatting. That works just fine. Not as pretty, but it works! If you should be able to come up with a fix please let me know. Thanks for all your hard work! |
Is there any resolution of this as just come up against it? I realiase I can turn off formatting but would prefer not to. |
I am having the same issue here... Demo Try with "4111 1111 1111 1111" and keep adding 1's Is there a way to prevent further chars in our end? |
@eduarguz I have exactly the same problem, I have not been able to solve it, the strange thing is that in the web demo of the library the error is not, maybe the demo has another version? |
I think the issue is here: |
@polpenaloza apparently now visa supports 19 characters, https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2016/november/prepare-for-19-digit-credit-cards/ |
It appears that Visa cards (starting with 4) are not validating properly if I include cardNumberInput. It formats the card number properly but when I tab out after entering 16 digits it removes the last digit. If I add a space at the end it validates the card number. If I remove the cardNumberInput setting it validates after 16 digits without error. And, without formatting, obviously.
If I test with MasterCard it works as expected including formatting.
Thanks for looking at this.
The text was updated successfully, but these errors were encountered: