bendrucker / creditcards-types

Card type definitions and methods for creditcards
MIT License
71 stars 20 forks source link

Test Card Number 6011 1111 1111 1117 Incorrectly Identified #54

Closed edmondchui closed 4 years ago

edmondchui commented 4 years ago

The test credit card number 6011 1111 1111 1117 should be a Discover card number, but got identified as Maestro.

edmondchui commented 4 years ago

A suggested regular expression for Discover card from https://www.regular-expressions.info/creditcard.html

/^6(?:011|5[0-9]{2})[0-9]{12}$/

bendrucker commented 4 years ago

It is a non-goal of this library to work with test card numbers used by a specific payment provider (e.g. Stripe). I've gotten several reports about this one:

https://github.com/bendrucker/creditcards-types/issues/28

See ./docs/discover.md. This number does not match the official issuing spec so I don't intend to support it. It's not that I'm trying to break it, but I can't reasonably build in specific workarounds.

edmondchui commented 4 years ago

Thanks for the update.