Live data from Hacker News

How to Correctly Detect Credit Card Type

creditcardjs.com

31–40 of 67 posts

Re: How to Correctly Detect Credit Card Type

#31

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".

Saving one click can increase conversions, and if you're doing any real volume even a tiny fraction of a percent can more than pay for the time involved in implementing something like that.

As to why it can't be detected and just neither asked nor shown, it's handy to show people where the CVV2 number is, and how many digits, as many people don't understand what it is even after repeated use. You'd be surprised how often I call in a food order with my Amex and have them tell me it's a 3 digit number on the back of the card. Even someone who takes CC numbers all day doesn't know that an Amex's CVV2 is a 4 digit number on the front, so you can't expect average Joe Amex user to know better.

Also it's nice to group the digits properly when I'm typing them in. So it's nice to have a form at least detect it, even for me.

Re: How to Correctly Detect Credit Card Type

#32
post #28

Earlier quoted context omitted.

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.

"We can't take American Express".

It's a valid thing to say, and a valid thing for you to detect and notify the user about. You know, before they finish typing everything else they have to type in.

Re: How to Correctly Detect Credit Card Type

#34

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".

I find it useful when they have the list of cards they take on there, and one lights up (or they are all lit up and the other 3 choices gray out). The thing that they are suggesting with showing me the text of the card seems pretty bogus to me. I know that I'm entering an AMEX or Discover; but I have no idea if the website actually takes them without having some indication of the choices before I start typing.

Re: How to Correctly Detect Credit Card Type

#35

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".

Saving one click can increase conversions, and if you're doing any real volume even a tiny fraction of a percent can more than pay for the time involved in implementing something like that. As to why it can't be detected and just neither asked nor shown, it's handy to show people where the CVV2 number is, and how many digits, as many people don't understand what it is even after repeated use. You'd be surprised how o…

Funnily enough, the form in the original post validated my credit card number as Amex and then validated a 3-digit CVV number as OK.

Re: How to Correctly Detect Credit Card Type

#36
Please don't rely on this.

For example of the extra detail that is really involved, see: http://en.wikipedia.org/wiki/List_of_Issuer_Identification_N... - e.g. 504837 is ATM only despite looking like a MasterCard.

Card identification also occasionally changes - Diners was bought by MasterCard, Visa used to be 13 digits, etc.

I'd be really wary of hard-coding this anywhere. If it passes the Luhn algorithm and the first digit is ok, consider just passing it on to your processor and seeing if it gets approved. Add a black list of known-not-to-be-valid prefixes if you'd like. But a whitelist of valid prefixes will break one day without warning while also not really being the full list of valid prefixes you think it is.

If you really need to be doing this, you can pay for a regular feed from a processor, but the only use case I've ever seen for truly needing that was to identify debit cards by number.

I've had cashiers force through faked manual auths on 19 digit private bank debit cards, which I assume is fraud disguised as incompetence. But I think dealing with a few weird cases (with proper auditing in place) is better than declining a legit card because they expanded the valid prefixes and your code wasn't updated.

Re: How to Correctly Detect Credit Card Type

#37
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.)

agreed but on mobile I find spinning through the drop-down more annoying than typing the exp date.

Re: How to Correctly Detect Credit Card Type

#38
post #35

Earlier quoted context omitted.

Saving one click can increase conversions, and if you're doing any real volume even a tiny fraction of a percent can more than pay for the time involved in implementing something like that. As to why it can't be detected and just neither asked nor shown, it's handy to show people where the CVV2 number is, and how many digits, as many people don't understand what it is even after repeated use. You'd be surprised how o…

Funnily enough, the form in the original post validated my credit card number as Amex and then validated a 3-digit CVV number as OK.

Some amex cards have a 3 digit cvv [1].

[1] http://ecommerce.shopify.com/c/shopify-discussion/t/heads-up...

Post reply on HN