WebAppers

/ best free open source web resources /

Shopify

Auto Detecting Credit Card Type with JavaScript

Posted · Category: Forms, License Free

Everyone knows that credit cards were actually quite well-suited to the web, and so the credit card form was born. There are several sites who have done away with the credit card type field. Both Amazon and GitHub don’t require you to select a credit card type in their form. As you fill in the credit card number, the user interface changes to show the type of credit card being used.

Auto-detecting Credit Card Type is a nice addition to the standard payment form because it frees up the user from entering what is actually redundant information. It’s trivial to determine the type of credit card being used once you understand how credit card numbers work.

credit-card-type-detect

Source: http://webstandardssherpa.com/reviews/auto-detecting-credit-card-type/

1 Comment
  • http://docraptor.com Tyler

    Nice! I’m a big proponent of making it as easy as possible for users to actually use my site, and that goes double when they’re paying for a service. This is a clean, elegant solution, and while entering the type of credit card is a minor problem, it’s still a problem.

Supported By

Deals

Web Browsers Icon Set
Food Icon Set
Flat Icon Set

Flat Icon Set

100 icons