Right now I detect the credit card type based upon the first four numbers of it.
How often do these first four digits change? Is there a service which can interface with ASP.NET that will keep an up to date list of these first four digits and their corresponding institutions?
According to the Wikipedia article on this, the last significant change to this list was in 2007. Keeping your software up to date shouldn't be too challenging, even if you do hard code this.
Sorry to disagree with the other answerers, but the first six digits (not four) of a card number are known as the issuer identifier range. New ranges are FREQUENTLY added or removed to this list. You would typically need to be on a mailing list from the card issuers to even attempt to keep up to date
This document from Barclays (UK) for example shows a number of revisions in the last few months, such as the addition of a 6440-6599 range for Diners card. http://www.barclaycard.co.uk/business/documents/pdfs/bin_rules.pdf
Basically, attempting to identify card from the IIN is tricky at best. It's not clear why you want to identify a card from the IIN, but it typically isnt necessary if you are performing authorization through a payment gateway
At risk of answering your question without answering it, have you seen this? How do you detect Credit card type based on number?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With