-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] Added additional MasterCard range to the CardSchemeValidator #19316
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
Conversation
From October 2016 MasterCard will introduce a new card range, 222100 through 272099. See: https://www.mctestcards.com/ (click the help in top right) Implements unit tests and validation for this new card range.
@@ -102,6 +102,12 @@ public function getValidNumbers() | |||
array('MAESTRO', '6594371785970435599'), | |||
array('MASTERCARD', '5555555555554444'), | |||
array('MASTERCARD', '5105105105105100'), | |||
array('MASTERCARD', '2221005555554444'), | |||
array('MASTERCARD', '2230000000000000'), | |||
array('MASTERCARD', '2300000000000000'), |
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 we are testing 23xxx
, 26xxx
and 27xxx
maybe we should also test the missing 24xxx
and 25xxx
to avoid future regressions (these regexps are a bit tricky).
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.
The reason for testing 23xxx
and 26xxx
is beceause they are both in the range where only the 2 first digits need checking.
Therefor i feel that testing 24xxx
and 25xxx
is redundant, but i can add them if needed ?
👍 The linked resource clearly shows that we should merge this as soon as possible. Thanks @dvaeversted. |
Thank you @dvaeversted. |
…chemeValidator (Dennis Væversted) This PR was merged into the 2.7 branch. Discussion ---------- [Validator] Added additional MasterCard range to the CardSchemeValidator From October 2016 MasterCard will introduce a new card range, 222100 through 272099. See: https://www.mctestcards.com/ (click the help in top right) This implements the additional regex for validation to succeed, and some additional unit tests for this new range. | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 4d68f56 [Validator] Added additional MasterCard range to the CardSchemeValidator
From October 2016 MasterCard will introduce a new card range, 222100 through 272099.
See: https://www.mctestcards.com/ (click the help in top right)
This implements the additional regex for validation to succeed, and some additional unit tests for this new range.