Live data from Hacker News

How to Correctly Detect Credit Card Type

creditcardjs.com

21–30 of 67 posts

Re: How to Correctly Detect Credit Card Type

#21
post #9

Why does it even matter if you show the credit card type when the user is typing it in? If the first 6 numbers determine the card type, then handling card type can be done on the backend. Why make the effort to show users information that they already know, ie. card type?

It helps to display the card type while you type because then I know that I am typing something reasonable and I know that I am not entering incorrectly. Of course, the entire card number could still be wrong which can only be validated by the server/backend processor but overall, displaying the type gives a level of "instant" comfort. It also gives users peace of mind that they system knows what they are doing. Thin…

I get your point, but to tell that a card is a VISA you just need to enter "4". I don't think it makes much of a difference really, just avoid showing in card type info and no one wonders.

It might be better to let the customer pick their card type, that you could also better inform them that you do not accept their card type.

Re: How to Correctly Detect Credit Card Type

#22

Hi, my credit card company is not listed there, yet it exists: my IIN is 6371. I'm afraid this is not completely accurate at all. There are many credit card IINs and those are just a very few and will not work with some international cards (including international visa cards). Those numbers are issued by the American Bankers Association - in accordance to ISO 7812. They are not attached to a credit card flag, but to…

Are you the guy with the Rails app that has something like 5000 models (one for each ATM)?

Re: How to Correctly Detect Credit Card Type

#23

Hi, my credit card company is not listed there, yet it exists: my IIN is 6371. I'm afraid this is not completely accurate at all. There are many credit card IINs and those are just a very few and will not work with some international cards (including international visa cards). Those numbers are issued by the American Bankers Association - in accordance to ISO 7812. They are not attached to a credit card flag, but to…

I can confirm this is the case, which is why services like http://www.binlist.net/ exist.

Re: How to Correctly Detect Credit Card Type

#24
post #12

Another usability tip on credit card forms: Don't use drop-downs for the expiration date. People are just typing them directly off the card, let them type them. Don't force them to deal with large and annoying select boxes. Stripe checkout[1] is a good example of how to do it (though by no means were they the first to do this, just a popular example). 1: https://stripe.com/docs/checkout

I can type right into a drop down, and 99 times out of 100 it will do the right thing. (Sometimes it's weird with a list of states, where it might be sorted by the state abbreviation while showing the state name or vice versa.)

Unfortunately, many payment systems represent the dropdown for the months with zero-padding while others are without. Usually, typing the 0 (because it's on the card) will – if it's not included in the dropdown – not select the correct month. This can cause frustration for the end user. The best way to input credit card information, would be to only have text-fields.

Re: How to Correctly Detect Credit Card Type

#27

Hi, my credit card company is not listed there, yet it exists: my IIN is 6371. I'm afraid this is not completely accurate at all. There are many credit card IINs and those are just a very few and will not work with some international cards (including international visa cards). Those numbers are issued by the American Bankers Association - in accordance to ISO 7812. They are not attached to a credit card flag, but to…

Are you the guy with the Rails app that has something like 5000 models (one for each ATM)?

Yes, we do have around that number of tables which reflected into those thousands of models. Many of them are related to storing 'frozen' regulation data. One example: every X time we need to create something very similar to a IRS forms (electronic) and send it to a bunch of government agencies because the data sent must be available for reports we can't just store a text file. One of those regulations requires hundreds of tables:

https://www.fazenda.sp.gov.br/sped/downloads/GUIA_PRATICO_DA...

Some systems are very sensitive to transient data and pretty much needs to store all of it, depending on how you plan to use that data later it can add a good number of tables to your software.

Re: How to Correctly Detect Credit Card Type

#28

Why is detecting credit cards even useful? I know what card I have, you telling me "Yep that's a VISA card" isn't really that helpful. Yes, I might enter the first four digits wrong and see the wrong card icon light up may help me a little, but aren't I just as likely to enter the last 12 digits wrong. In the case of VISA you're pretty much just telling me "Yep, that first one is a 4".

Wouldn't it save the user one click to select what card they've got?

Re: How to Correctly Detect Credit Card Type

#29

Why is detecting credit cards even useful? I know what card I have, you telling me "Yep that's a VISA card" isn't really that helpful. Yes, I might enter the first four digits wrong and see the wrong card icon light up may help me a little, but aren't I just as likely to enter the last 12 digits wrong. In the case of VISA you're pretty much just telling me "Yep, that first one is a 4".

There's a check digit, so calculating isValidCC should be trivial.

Re: How to Correctly Detect Credit Card Type

#30
post #28

Why is detecting credit cards even useful? I know what card I have, you telling me "Yep that's a VISA card" isn't really that helpful. Yes, I might enter the first four digits wrong and see the wrong card icon light up may help me a little, but aren't I just as likely to enter the last 12 digits wrong. In the case of VISA you're pretty much just telling me "Yep, that first one is a 4".

Wouldn't it save the user one click to select what card they've got?

I think the GP is questioning whether that piece of information is even necessary to process the transaction.
Post reply on HN