Skip to content

Commit

Permalink
fix bancontact maestro card numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
zfighou committed Sep 5, 2023
1 parent 6b6f9f3 commit 645d2a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/DEdge.Cardidy/Model/Cards.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ public MaestroUk() : base(CardType.MaestroUk, new[] { 6759, 676770, 676774 }, Fr

internal record Maestro : ALuhnCard
{
public Maestro() : base(CardType.Maestro, new[] { 5018, 5020, 5038, 5893, 6304, 6759, 6761, 6762, 6763 }, From12To19) { }
public Maestro() : base(CardType.Maestro, new[] { 5018, 5020, 5038, 5893, 6304, 6759, 6761, 6762, 6763,
//https://www.freebinchecker.com/belgium_maestro-bin-list-brand?hl=fr
6703,6799,6775,6711,6708,6705,6709,6390,6792,6706
}, From12To19) { }
}

internal record MasterCard : ALuhnCard
Expand Down
2 changes: 2 additions & 0 deletions src/Tests/IdentifyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public class IdentifyTests
[TestCase("5018-7100009012345", ExpectedResult = CardType.Maestro)]
[TestCase("5018-71000090123456", ExpectedResult = CardType.Maestro)]
[TestCase("5018-710000901234567", ExpectedResult = CardType.Maestro)]
[TestCase("67044- 4444444449", ExpectedResult = CardType.Maestro)]
[TestCase("670300- 0000000000003", ExpectedResult = CardType.Maestro)]
public CardType ShouldIdentifyAsMaestro(string cardNumber) => Cardidy.Identify(cardNumber, useCheck: false, ignoreNoise: true).First();

[TestCase("676770-0000901089", ExpectedResult = CardType.MaestroUk)]
Expand Down

0 comments on commit 645d2a4

Please sign in to comment.