Closed diogomqbm closed 3 years ago
It's a feature that increases isValid method usability. Now you're able to specify which card types you want to verify for the desired card number. Closes https://github.com/ContaAzul/creditcard.js/issues/129
isValid
It is possible that my payment gateway doesn't support all supported card types from this library. In that case, I'd like to be able to specify which cards I support and for those cards I'd like to see if the passed number is valid or not.
isValid('4916108926268679', { cards: ['visa', 'mastercard'] }) // returns true isValid('4916108926268679', { cards: ['mastercard'] }) // returns false
@cirocfc LGTM :+1:
What is the change?
It's a feature that increases
isValid
method usability. Now you're able to specify which card types you want to verify for the desired card number. Closes https://github.com/ContaAzul/creditcard.js/issues/129Why make this change?
It is possible that my payment gateway doesn't support all supported card types from this library. In that case, I'd like to be able to specify which cards I support and for those cards I'd like to see if the passed number is valid or not.
Test plan