Repository navigation
Conversation
michalsn
requested changes
Nov 21, 2026
michalsn
left a comment
Member
There was a problem hiding this comment.
This looks right. Could you provide a source confirming that 646 is a valid Discover prefix? Please also add a changelog entry.
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
Thanks @michalsn! 1. Source for 646 as a valid Discover prefixDiscover's official Issuer Identification Number (IIN / BIN) range includes
In the original array ( 2. Changelog entryI have added the changelog entry to |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In
system/Validation/CreditCardRules.php, theDiscover Cardprefix list contained a typo (656instead of646):Discover IIN ranges officially include
6011,622126–622925,644–649, and65.In the prefix list,
656was an apparent typo for646(leaving646missing, while656was already redundant with prefix65). As a result, valid Discover card numbers starting with646were rejected byvalid_cc_number.Sources confirming Discover IIN prefix range 644–649 (including 646):
6011,622126–622925,644–649, and65to the Discover Network.^6(?:011|5[0-9]{2}|4[4-9][0-9]|22...)).This PR:
CreditCardRules::$cardList['Discover Card']['prefixes']from656to646.discover21(16-digit646*) anddiscover22(19-digit646*) intests/system/Validation/StrictRules/CreditCardRulesTest.php(which also coverstests/system/Validation/CreditCardRulesTest.php).docs/changelogs/v4.7.7.md.Checklist: