You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Bert Put <be...@ipacc.com> on 2016/06/22 22:15:43 UTC

[validator] Mastercard numbers should be 16, 17, 18, 19 digits long

Hello,

Fist post, so please let me know if I have posted to the wrong place.

Our third party credit card processor has advised us that Mastercard
numbers can be 16,17, 18, or 19 digits.  Previously the card number was
only 16 digits long.  The Creditcard validator enforces 16 digits, but
rejects card numbers that are 17, 18, or 19 digits long.  I have tried to
find "official" documentation on mastercard.com to verify this requirement,
but I can only find anecdotal evidence at the moment.

Perhaps someone on this list can provide more authoritative information?
If so, is there a timeline for a possible fix?  If we can find
authoritative information to confirm the card number length I would be
happy to make the change if someone will guide me through the process.

Thank you, and please let me know if there is anything I can do to assist
this effort.

Regards,    Bert

Re: [validator] Mastercard numbers should be 16, 17, 18, 19 digits long

Posted by Bert Put <be...@ipacc.com>.
Hi Sebb,

On Wed, Jun 22, 2016 at 6:21 PM, sebb <se...@gmail.com> wrote:

> On 22 June 2016 at 23:15, Bert Put <be...@ipacc.com> wrote:
> > Hello,
> >
> > Fist post, so please let me know if I have posted to the wrong place.
>
> Right place for initial contact.
> - but we prefer people not to use their fists up front ;-)
>
> I'm so sorry -- I should not post at the end of the day when misspellings
can get in! :-)


> Well, what we need is documentation on the new format.
> They added some new prefixes recently, see:
>
> https://issues.apache.org/jira/browse/VALIDATOR-392
>
> Yes, I'm aware of the new prefixes.  That's what is driving my change --
I'm switching from our home-grown validator to this one.  I do recognize
the requirement for authoritative documentation, which is part of my
problem.  I'm not a direct partner with mastercard so I may not be able to
dig as deeply into the MC documentation as I'd hoped some folks here might
be able to.  I'll keep digging and let you know.


> Have they also added more digits?
> If so, do they apply to all the BINs or only some?
>
> I believe the answers to these questions are *yes*, they've added more
digits.  I suspect (again, anecdotal only), that the driver for more digits
is that the length of the BINs will increase.


> Note that the RE for the current checks is at:
>
>
> https://github.com/apache/commons-validator/blob/trunk/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java#L137
>
> Thank you.  I did find where I'd have to change the code, but I hesitate
for lack of authoritative documentation.  Is it possible that someone on
the list may have access to better documentation than me?  Meanwhile, I'll
continue to dig.

Regards,    Bert

Re: [validator] Mastercard numbers should be 16, 17, 18, 19 digits long

Posted by sebb <se...@gmail.com>.
On 22 June 2016 at 23:15, Bert Put <be...@ipacc.com> wrote:
> Hello,
>
> Fist post, so please let me know if I have posted to the wrong place.

Right place for initial contact.
- but we prefer people not to use their fists up front ;-)

> Our third party credit card processor has advised us that Mastercard
> numbers can be 16,17, 18, or 19 digits.  Previously the card number was
> only 16 digits long.  The Creditcard validator enforces 16 digits, but
> rejects card numbers that are 17, 18, or 19 digits long.  I have tried to
> find "official" documentation on mastercard.com to verify this requirement,
> but I can only find anecdotal evidence at the moment.
>
> Perhaps someone on this list can provide more authoritative information?
> If so, is there a timeline for a possible fix?  If we can find
> authoritative information to confirm the card number length I would be
> happy to make the change if someone will guide me through the process.
>
> Thank you, and please let me know if there is anything I can do to assist
> this effort.

Well, what we need is documentation on the new format.
They added some new prefixes recently, see:

https://issues.apache.org/jira/browse/VALIDATOR-392

Have they also added more digits?
If so, do they apply to all the BINs or only some?

Note that the RE for the current checks is at:

https://github.com/apache/commons-validator/blob/trunk/src/main/java/org/apache/commons/validator/routines/CreditCardValidator.java#L137


> Regards,    Bert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org