Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I validate Credit Card and Bank Account numbers? [closed]

I know there have been a lot of discussion related to this topic, e.g. Credit Card validation: can Card Name contain non-ASCII characters?

The reason I wanted to ask this question is because people could find all the information at one place.

What I've found out (Please correct me if/where I'm wrong):

Title - Length - Format

Credit Card Number - MIN 13, MAX 19 - Numeric

Credit Card Name - MAX 26 - Alpha Numeric (Cannot contain dots after Initials?)

Bank Account Number (btw, I'm in India) - MIN 11, MAX 15 - Numeric

Bank Account Name - Sorry, no idea - Alpha Numeric? (again, no idea)

Please provide answers so that this will help people who have to juggle with financial data.

like image 507
th3an0maly Avatar asked Oct 06 '12 17:10

th3an0maly


People also ask

How do I know if my credit card is still active?

One way to check if your card is active is by calling your card issuer's customer support phone number and asking. This number is usually listed on the back of your card. Besides maybe a few seconds of hold time, this is the quickest and easiest way to check the status of your card.

What happens when a bank closes your credit card account?

Closed Accounts and the Credit Reporting Time Limit Even though the credit card account is closed, it will remain on your credit report at least for the duration of the credit reporting time limit. If you're still making payments on the balance, the payment history and timeliness of your payments will also be reported.


Video Answer


1 Answers

Read this article: link

It's about generating credit card numbers, but it helps figuring out if the card is valid.

These are the rules that links credit card companies to their credit card numbers:

Visa = 4XXX - XXXX - XXXX - XXXX
MasterCard = 5[1-5]XX - XXXX - XXXX - XXXX
Discover = 6011 - XXXX - XXXX - XXXX
Amex = 3[4,7]X - XXXX - XXXX - XXXX
Diners = 3[0,6,8] - XXXX - XXXX - XXXX
Any Bankcard = 5610 - XXXX - XXXX - XXXX
JCB =  [3088|3096|3112|3158|3337|3528] - XXXX - XXXX - XXXX
Enroute = [2014|2149] - XXXX - XXXX - XXX
Switch = [4903|4911|4936|5641|6333|6759|6334|6767] - XXXX - XXXX - XXXX
like image 160
Sean Vaughn Avatar answered Nov 05 '22 01:11

Sean Vaughn