php-credit-card-validator icon indicating copy to clipboard operation
php-credit-card-validator copied to clipboard

Include MIR credit card

Open arturhayne opened this issue 3 years ago • 0 comments

MIR credit card has been recognized as "mastercard", but it should has a different validation, something like below:

protected static $mirCardPattern = [
            'mir' => [
                'type'      => 'mir',
                'pattern'   => '/^220[0-4]/',
                'length'    => [16, 17, 18, 19],
                'cvcLength' => [3],
                'luhn'      => true,
            ],
        ];    

Mastercard should be updated to something like: '/^(5[0-5]|2[3-7]|22[1-9]|220[5-9])/' extracting MIR from its pattern.

MIR Range: 2200–2204 MIR Length: 16–19

https://en.wikipedia.org/wiki/Payment_card_number

Thank you.

arturhayne avatar Nov 02 '21 22:11 arturhayne