Commit bcd41bd
committed
fix(card): mastercard() no longer accepts non-Mastercard 2-series BINs
The Mastercard 2-series range is 2221-2720, but the prefix pattern
matched 22-27 (i.e. 2200-2799). Numbers in 2200-2220 and 2721-2799 were
wrongly accepted as Mastercard, including Mir cards (2200-2204): the same
number passed both mir() and mastercard().
Use the precise 2-series sub-ranges. The Mir test cards are now included
in the mastercard negative fixtures, which they failed before this change.1 parent 70de324 commit bcd41bd
2 files changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
84 | 90 | | |
85 | 91 | | |
86 | 92 | | |
| |||
0 commit comments