We want to make a customer buying experience a rich and interactive one. How can we possibly make the credit card field of your purchase path interactive? One way is to ensure credit card numbers are the correct format before they hit “submit” and find out there’s an issue. That’s where Braintree’s Card Validator comes into service. It uses math to calculate if a credit card number potentially is invalid as well as additional checks on what brand of card, the length of the security code based on the card, etc. Because of this we are able to enrich the experience without the customer really even realizing it.
Does this package replace real-world credit card validation? Absolutely not. We still validate every credit card through our payment processor partners before charging a card. But with this package we are able to pre-check the card for possible invalid status before the user submits their information.
Package Name: Credit Card Validator
Website: https://github.com/braintree/card-validator