-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added more credit cards inside cards.js #168
base: master
Are you sure you want to change the base?
Conversation
@cacontinuos check it out |
name: 'Santander', | ||
bins: /^4\d{15}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Caixa Econômica Federal', | ||
bins: /^627\d{13,16}$/, | ||
codeLength: 3, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vr-varad, are all these new registrations card brands? From what I noticed, Santander and Caixa Econômica Federal are banks and not card brands.
{ | ||
name: 'UnionPay International', | ||
bins: /^(62[1-5]|81[0-9])\d{14,17}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Carte Blanche', | ||
bins: /^389[0-9]{11}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Laser', | ||
bins: /^(6304|6706|6771|6709)\d{8,15}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Eurocard', | ||
bins: /^(4596|4312|4317|4388)\d{12}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Carta Si', | ||
bins: /^432917\d{10}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'ECMC', | ||
bins: /^5[45][0-9]{14}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Visa Electron', | ||
bins: /^4(026|17500|405|508|844|913|917)\d{10,13}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'UATP', | ||
bins: /^1\d{14}$/, | ||
codeLength: 4, | ||
}, | ||
{ | ||
name: 'Banamex', | ||
bins: /^52[2-9]\d{14}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Bancomer', | ||
bins: /^53[0-9]\d{14}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'KoreanCard', | ||
bins: /^9[0-9]{15}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'N26', | ||
bins: /^5355\d{14}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Revolut', | ||
bins: /^5398\d{14}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Starbucks Card', | ||
bins: /^62\d{17}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Woori Card', | ||
bins: /^6[0-9]{18}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Shinhan Card', | ||
bins: /^9[0-9]{16}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Sberbank', | ||
bins: /^4276\d{12}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Alfa-Bank', | ||
bins: /^4154\d{12}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Santander', | ||
bins: /^4\d{15}$/, | ||
codeLength: 3, | ||
}, | ||
{ | ||
name: 'Caixa Econômica Federal', | ||
bins: /^627\d{13,16}$/, | ||
codeLength: 3, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add tests in credicard.test.js file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests as in can u briefly explain it would be helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you notice file credicard.test.js contains tests to ensure getCreditCardNameByNumber
method works correctly. Ideally, tests should be added for each new card.
Added as many cards as I found that are highly used worldwide.