Open sesser opened 2 months ago
The regex pattern used to detect MasterCard excludes a portion of cards (according to the range 2221 - 2720). Specifically, 2230 - 2299. Also, according to MC simplified BIN account range, the min BIN is 222635. You can download the list from https://www.mastercard.us/en-us/business/issuers/get-support/simplified-bin-account-range-table.html I can't speak to BINs that start with 2221-2225. I have not researched. CardBrand.from("223557******") yields Unknown when it should be MasterCard I think this can be solved with a minor adjustment to the regex pattern
The regex pattern used to detect MasterCard excludes a portion of cards (according to the range 2221 - 2720). Specifically, 2230 - 2299. Also, according to MC simplified BIN account range, the min BIN is 222635. You can download the list from https://www.mastercard.us/en-us/business/issuers/get-support/simplified-bin-account-range-table.html
I can't speak to BINs that start with 2221-2225. I have not researched.
CardBrand.from("223557******")
Unknown
MasterCard
^(?:5[1-5][0-9]{2}|222[1-9]|2[2-6][0-9]{2}|27[01][0-9]|2720)[0-9]*
Specify the version of Credit Card Number: 4.0.4 version of Java: 17 operating system and version: Alpine/macOS
Specify the
4.0.4
17
@sesser Sorry - for some reason I saw this very late. Let me evaluate and fix.
Issue
^(?:5[1-5][0-9]{2}|222[1-9]|2[2-6][0-9]{2}|27[01][0-9]|2720)[0-9]*
Environment