Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#18889 closed defect (fixed)

New Mastercard card number ranges

Reported by: Robert Coup Owned by: dylan
Priority: blocker Milestone: 1.4.7
Component: Dojox Version: 1.11.2
Keywords: Cc:
Blocked By: Blocking:

Description

https://www.mastercard.us/en-us/issuers/get-support/2-series-bin-expansion.html

Mastercard has received an additional range of 2-series numbers to add to the 5-series that we currently provide.

The card number prefix range 222100 - 272099 should be treated in the same manner as the existing prefix range 510000 - 559999. Is starting to roll out to payment gateways/software/etc now, and cards are intending to be issued in 2017.

dojox.validate.creditCard has regexes for range validation which need to be updated.

Change History (19)

comment:1 Changed 3 years ago by dylan

Milestone: tbd1.11.3
Priority: undecidedblocker

comment:2 Changed 3 years ago by hcampbell

I believe this is a matching regex to include the new ranges:

(?:(?:2(221|22[2-9|2[3-9][0-9]|[3-6][0-9]{2}|7[01][0-9]|720)[0-9]{12})|(?:5[1-5][0-9]{14}))

That's by adding the ranges as follows:

222100 - 222199 pattern: 222[1-2][0-9]{2}

222200 - 222999 pattern: 222[2-9][0-9]{2}

223000 - 229999 pattern: 22[3-9][0-9]{3}

230000 - 269999 pattern: 2[3-6][0-9]{4}

270000 - 271999 pattern: 27[0-1][0-9]{3}

272000 - 272099 pattern: 2720[0-9]{2}

All start with 2 and end in to digits, so breaking out the middle digits and adding the 10 at the end:

2(221|22[2-9|2[3-9][0-9]|[3-6][0-9]{2}|7[01][0-9]|720)[0-9]{12}

comment:3 Changed 3 years ago by Robert Coup

Fixed a bug:

new ranges regex:

2(22[1-9]|2[3-9][0-9]|[3-6][0-9][0-9]|7[0-1][0-9]|720)[0-9]{12}

overall mastercard regex:

(5[1-5][0-9]{2})|2(22[1-9]|2[3-9][0-9]|[3-6][0-9][0-9]|7[0-1][0-9]|720)[0-9]{12}

comment:4 Changed 3 years ago by Robert Coup

comment:5 Changed 3 years ago by dylans <dylan@…>

Resolution: fixed
Status: newclosed

In 10a245f/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:6 Changed 3 years ago by dylans <dylan@…>

In d16d5da/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:7 Changed 3 years ago by dylans <dylan@…>

In a77d9da/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:8 Changed 3 years ago by dylans <dylan@…>

In 082379e/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:9 Changed 3 years ago by dylans <dylan@…>

In 6f032f4/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:10 Changed 3 years ago by dylans <dylan@…>

In f2edb78/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:11 Changed 3 years ago by dylans <dylan@…>

In 9700c83e/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:12 Changed 3 years ago by dylans <dylan@…>

In 571fb0b/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:13 Changed 3 years ago by dylans <dylan@…>

In 651a5f4/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:14 Changed 3 years ago by dylans <dylan@…>

In 6c9605b/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:15 Changed 3 years ago by dylans <dylan@…>

In c7ff7cc/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:16 Changed 3 years ago by dylans <dylan@…>

In c5a9d17/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:17 Changed 3 years ago by dylans <dylan@…>

In 71efbfe/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:18 Changed 3 years ago by dylans <dylan@…>

In a9c4657/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:19 Changed 3 years ago by dylan

Milestone: 1.11.31.4.7
Note: See TracTickets for help on using tickets.