We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Library does not recognize the following BIN 67999989, at the moment the error is obtained: Unknown credit card method
The text was updated successfully, but these errors were encountered:
func isMaestro(c *Card, ccDigits digits) bool { return matchesValue(ccDigits.At(4), []int{5018, 5020, 5038, 5612, 5893, 6304, 6759, 6761, 6762, 6763, 6390}) || c.Number[:3] == "0604" }
This example uses the card validator library from npm. And as we can see the card number 6799998900000200010 gets maestro as the card brand.
6799998900000200010
maestro
'use strict' const valid = require("card-validator") const numberValidation = valid.number("6799998900000200010") if (!numberValidation.isPotentiallyValid) { console.error("error") } if (numberValidation.card) { console.log(numberValidation.card.type) // 'maestro' }
card-validator uses credit-card-type to validate the card brands. And as we can see in src/lib/card-types.ts line 104
card-validator
maestro: { niceType: "Maestro", type: "maestro", patterns: [ 493698, [500000, 504174], [504176, 506698], [506779, 508999], [56, 59], 63, 67, 6, ], gaps: [4, 8, 12], lengths: [12, 13, 14, 15, 16, 17, 18, 19], code: { name: "CVC", size: 3, }, } as BuiltInCreditCardType,
Maestro uses more numbers as a pattern to check the brand.
patterns: [ 493698, [500000, 504174], [504176, 506698], [506779, 508999], [56, 59], 63, 67, 6, ],
When in Go we only use these
5018, 5020, 5038, 5612, 5893, 6304, 6759, 6761, 6762, 6763, 6390 and 0604
Sorry, something went wrong.
No branches or pull requests
Library does not recognize the following BIN 67999989, at the moment the error is obtained: Unknown credit card method
The text was updated successfully, but these errors were encountered: