Maestro Card Validation

2,654 views
Skip to first unread message

Pete

unread,
Nov 29, 2007, 6:40:21 AM11/29/07
to Active Merchant
Hi,

I think the current validation for credit card numbers needs to be
updated as Switch cards are now no longer being used.

The line for the Switch regex could just be removed - cards with these
number will then be detected as a Maestro card - which I believe to be
correct. The regex for Maestro should then be changed to allow 16, 18
or 19 digit numbers, ie:

'maestro' => /^(5[06-8]|6\d)\d{14}(\d{2,3})?$/,

-Pete

Cody Fauser

unread,
Nov 29, 2007, 8:44:37 AM11/29/07
to activem...@googlegroups.com
Pete,

Switch is now Maestro UK, which is different from Maestro
International. The distinction is important when you need to
differentiate between the two, such as when identifying the card type
to the gateway.

At some point we'll change the regex key from switch to maestro_uk so
that it is more clear.

See the following for more info:
http://www.barclaycardbusiness.co.uk/information_zone/processing/bin_rules.html


--
Cody Fauser
http://shopify.com - e-commerce done right
http://www.codyfauser.com - blog
http://www.oreilly.com/catalog/rjsrails - RJS Templates for Rails

Pete

unread,
Nov 29, 2007, 10:11:49 AM11/29/07
to Active Merchant
Ah, didn't realise that there were two types of Maestro...

The referenced doc also lists Maestro International as having up to 19
digits.

On Nov 29, 1:44 pm, "Cody Fauser" <codyfau...@gmail.com> wrote:
> Pete,
>
> Switch is now Maestro UK, which is different from Maestro
> International. The distinction is important when you need to
> differentiate between the two, such as when identifying the card type
> to the gateway.
>
> At some point we'll change the regex key from switch to maestro_uk so
> that it is more clear.
>
> See the following for more info:http://www.barclaycardbusiness.co.uk/information_zone/processing/bin_...

Cody Fauser

unread,
Nov 30, 2007, 8:32:10 AM11/30/07
to activem...@googlegroups.com
Pete,

Thanks for noticing that. I'll get the regex updated.

On 11/29/07, Pete <pbfo...@gmail.com> wrote:
>

Reply all
Reply to author
Forward
0 new messages