You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying the lib with a card and despite being issued by Mastercard it didn't get recognized. The card is a mastercard platinum issued by a Brazilian bank and starts with "2235 25" and can be found using any online BIN validator.
I've checked the code that does this parsing and i believe the regex currently used for mastercard is /^(5[1-5]|677189)|^(222[1-9]|2[3-6]\d{2}|27[0-1]\d|2720)/g and changing it to /^(5[1-5]|677189)|^(222[1-9]|2[2-6]\d{2}|27[0-1]\d|2720)/g would fix it.
Is the lib still being updated with card formats? I could make a PR if needed.
The text was updated successfully, but these errors were encountered:
I was trying the lib with a card and despite being issued by Mastercard it didn't get recognized. The card is a mastercard platinum issued by a Brazilian bank and starts with "2235 25" and can be found using any online BIN validator.
According to the mastercard bin table available at https://www.mastercard.us/en-us/business/issuers/get-support/simplified-bin-account-range-table.html those cards are ranged from 2235250000 to 2235259999. Also it looks like there's a lot of banks using 223 prefix for mastercard.
I've checked the code that does this parsing and i believe the regex currently used for mastercard is
/^(5[1-5]|677189)|^(222[1-9]|2[3-6]\d{2}|27[0-1]\d|2720)/g
and changing it to/^(5[1-5]|677189)|^(222[1-9]|2[2-6]\d{2}|27[0-1]\d|2720)/g
would fix it.Is the lib still being updated with card formats? I could make a PR if needed.
The text was updated successfully, but these errors were encountered: