inacho / php-credit-card-validator

Validates popular debit and credit cards numbers against regular expressions and Luhn algorithm. Also validates the CVC and the expiration date.
MIT License
199 stars 104 forks source link

Fixed BIN check for new mastercard range (2221-2720) #9

Open pascal-hofmann opened 8 years ago

pascal-hofmann commented 8 years ago

The check for MasterCard is incorrect. The new BIN range for MasterCard that is valid since October 2016 is 2221-2720 and not 22-27.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9a1a26b5f44b76cb45e4b001647cc35ea4838e98 on pascal-hofmann:master into af3bab9af09dd159fbd23815ab08b1092d7fa963 on inacho:master.

cosmok commented 6 years ago

A bit different to: https://github.com/jessepollak/card/blob/635252d717528a7492b06b8f0b585b8b2434416d/dist/card.js#L1057

@inacho any chance this could be merged?