Skip to content
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

Bancontact (BCMC) credit card support #69

Open
gmoulin opened this issue Nov 5, 2020 · 0 comments
Open

Bancontact (BCMC) credit card support #69

gmoulin opened this issue Nov 5, 2020 · 0 comments

Comments

@gmoulin
Copy link

gmoulin commented Nov 5, 2020

Hello,

I tried to use the information on how to add a "custom cards" validation but I must be missing something.

I am trying to add Bancontact support.

Cards number example:

  • 6703 4444 4444 4449
  • 6703 0000 0000 0000 003

CVC: none
Not sure about the length, I found 13 to 19 in some other validators.

Here is the code I am using to add the card declaration.

window.payform.cards.push({
// Card type, as returned by payform.parseCardType.
type: 'BCMC',
// Regex used to identify the card type. For the best experience, this should be
// the shortest pattern that can guarantee the card is of a particular type.
pattern: /^6703/,
// Array of valid card number lengths.
length: [13,14,15,16,17,18,19],
// Array of valid card CVC lengths.
cvcLength: [0],
// Boolean indicating whether a valid card number should satisfy the Luhn check.
luhn: true,
// Regex used to format the card number. Each match is joined with a space.
format: /(\d{1,4})/g
});

By default, Bancontact cards are matching Maestro cards, but that's not OK because of the CVC at the least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant