Jump to content

American Express Card Invalid Number


Guest cdupuis

Recommended Posts

Guest cdupuis

I had a problem where people could not pay using an American Express card.

In case any other person has it here is the solution that was provided right away by Cubecart:

================Beginning=================

Please can you open classes/validate/validateCart.php

Find line: 48

$americanExpress = "^3[47][0-9]{13}$";

Replace with:

$americanExpress = "((^3[47])|(^3[37]))((\d{11}$)|(\d{13}$))";

That allows the card length to be 13 or 15 digits long starting 47 or 37.

=============== End ======================

Take care

Clement

Link to comment
Share on other sites

  • 4 months later...

Guest mhilliard

$americanExpress = "((^3[47])|(^3[37]))((\d{11}$)|(\d{13}$))";

I haven't been able to get this to work... has anyone else run into this and made the AMEX validation work?

Help!

Link to comment
Share on other sites

  • 3 months later...
  • 5 months later...

The new string in CC4.3 classes/validate/validateCart.php is:

'AMERICAN EXPRESS' => '#^[34|37|47]([0-9]{14}|[0-9]{13}|[0-9]{12})$#',

I just had a customer that had problems with her AmEx card on an order but was able to place the order with a different card. Anyone else having trouble with American Express cards using PayPal Pro via Alternative Checkout?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...