-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How to get the card type (visa, mastercard, etc.) so I can pass that info to payment gateway #604
Comments
not sure if this is still relevant but for people with the same question: you can use the bin of the card to decode if it's type, the bin is the bank identification number of each card and it identifies a card down to the bank which issued it, with a BIN API like the one from binlist.io you are easily able to check which card goes with which card type. |
I noticed there is an inbuilt payment library which documents the APIs available. Form field Get type
|
$('#someTextBox').change(function() {
$('#someOutput').text(creditCardTypeFromNumber($(this).val()));
}); This will output into some element with id="someOutput" the result of the text box which fires when the user changes the text in the element id="someTextBox". |
This comment was marked as off-topic.
This comment was marked as off-topic.
Thanks for the hints I ended up doing something similar to write to an
|
I'd like to be able to pass the card type as we want to display it later on.
The text was updated successfully, but these errors were encountered: