gustavofrizzo / CreditCardValidator

A C# library for validating and generating credit card numbers.
MIT License
107 stars 35 forks source link

CreditCardFactory generates pre-paid Visa numbers #13

Open didymusbenson opened 5 years ago

didymusbenson commented 5 years ago

Seeking a way to distinguish between "normal" VISA cards and "pre-paid" cards.

Current Functionality: On occasion, the generated VISA account will be a number for a pre-paid card. This may cause conflicts if a business rule deems pre-paid cards as "invalid." Desired Functionality: When generating a VISA account, have the ability to specify pre-paid or not, or separate them into two different CardIssuer types.

gustavofrizzo commented 5 years ago

Hey Do you know the rules to differentiate between a prepaid and a normal card?

didymusbenson commented 5 years ago

I believe it has to do with the BIN. Reference source

PREPAID CARDS

BIN Brand Bank Type Level Country
370266 AMEX SERVE RELOADABLE PASS CARD DEBIT PREPAID US
372741 AMEX SERVE RELOADABLE CARD DEBIT PREPAID US
375150 AMEX BLUEBIRD BY AMERICAN EXPRESS AND WALMART DEBIT PREPAID US
403995 VISA NETSPEND ISSUED BY METABANK DEBIT PREPAID US
410489 VISA RUSHCARD ISSUED BY BANCORP BANK DEBIT PREPAID US
456534 VISA ACCOUNT NOW ISSUED BY METABANK DEBIT PREPAID US
467726 VISA NEXTWAVE ISSUED BY PEOPLES TRUST COMPANY DEBIT PREPAID CA
473622 VISA LIQUID CARD ISSUED BY JPMORGAN CHASE BANK N.A. DEBIT PREPAID US
484735 VISA VANILLA GIFT ISSUED BY THE BANCORP BANK DEBIT PREPAID US
486270 VISA HERITAGE BANK LTD DEBIT PREPAID AU
530446 MASTERCARD PCS CARD ISSUED BY PREPAID FINANCIAL SERVICES LTD DEBIT PREPAID FR
531306 MASTERCARD SKRILL CARD ISSUED BY WIRECARD CARD SOLUTIONS LTD DEBIT PREPAID GB
531445 MASTERCARD PAYONEER CARD ISSUED BY CHOICE BANK LTD DEBIT PREPAID BZ
533157 MASTERCARD EUROSET KUKURUZA BY CENTER OF FINANCIAL TECHNOLOGIES DEBIT PREPAID RU
541275 MASTERCARD OPT PLUS ISSUED BY ALL TRANS FINANCIAL SERVICES C.U. DEBIT PREPAID CA
541592 MASTERCARD NETELLER by CONISTER BANK LTD. DEBIT PREPAID GB
544856 MASTERCARD GOOGLE WALLET ISSUED BY BANCORP BANK DEBIT PREPAID US
524825 MASTERCARD WALMART MONEY CARD ISSUED BY GREEN DOT BANK DEBIT PREPAID US

Virtual Cards

BIN Brand Bank Type Level Country
375142 AMEX TENCENT HOLDINGS TENPAY DEBIT VIRTUAL CN
377149 AMEX UNITED OVERSEAS BANK LIMITED DEBIT VIRTUAL SG
410162 VISA ENTROPAY ISSUED BY BANK OF VALLETTA DEBIT VIRTUAL MT
415059 VISA LA BANQUE POSTALE DEBIT VIRTUAL FR
419973 VISA VELOCITY ISSUED BY REV WORLDWIDE INC. DEBIT VIRTUAL AU
489049 VISA QIWI BANK (JSC) DEBIT VIRTUAL RU
524877 MASTERCARD HDFC BANK LTD. DEBIT VIRTUAL IN
530343 MASTERCARD NET1 CARD ISSUED BY BANCORP BANK DEBIT VIRTUAL US
553412 MASTERCARD HOOROO PTY LTD/GE CAPITAL DEBIT VIRTUAL AU
533935 MASTERCARD ECOCARD ISSUED BY PSI-PAY LTD. DEBIT VIRTUAL GB
540302 MASTERCARD CITIBANK N.A. DEBIT VIRTUAL US
541591 MASTERCARD NETELLER ISSUED BY OPTIMAL PAYMENTS LTD. DEBIT VIRTUAL GB

GIFT CARDS

BIN Brand Bank Type Level Country
372300 AMEX SIMON GIFT CARD DEBIT GIFT US
372301 AMEX BANK OF CANADA DEBIT GIFT CA
379019 AMEX TRAVELERS CHECK CARD DEBIT GIFT US
401366 VISA LAKE TRUST CREDIT UNION DEBIT GIFT US
431568 VISA VANILLA ISSUED BY THE BANCORP BANK DEBIT GIFT US
472926 VISA VANILLA ISSUED BY PEOPLES TRUST COMPANY DEBIT GIFT CA
511340 MASTERCARD VANILLA ISSUED BY PEOPLES TRUST COMPANY DEBIT GIFT CA
529275 MASTERCARD THE STATE BANK CARD ISSUED BY METABANK DEBIT GIFT US
544148 MASTERCARD EPIPOLI S.P.A. PREPAID CARD DEBIT GIFT IT
601194 DISCOVER DISCOVER BANK DEBIT GIFT US
601199 DISCOVER DISCOVER BANK DEBIT GIFT US
didymusbenson commented 5 years ago

I'd need to double-check bindb to make sure those numbers are up to date though. I'm not incredibly familiar with bins myself.