Shopping Carts?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
mstoffer
Forum Newbie
Posts: 1
Joined: Mon Oct 04, 2010 12:10 pm

Shopping Carts?

Post by mstoffer »

Is it possible to build a shopping cart that will only accept American Express cards? We have a company that does a lot of business online, but we don't want to accept Visa or Mastercard anymore and was hoping to build a shopping cart that would only accept AMEX if that is even possible. Does anyone know the answer to this?

Thank You,
Michael
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Shopping Carts?

Post by John Cartwright »

The world is your oister.

But seriously, it all depends on several factors. Is your credit card processor hosting the payment page or are you using an internal API.

If you have the user entering in their details on your website (and using an internal API to process payments), you could use a simple javascript function (backed up by PHP validation) to deter other credit cards being used.

Of course the best option would be to speak to your CC processor and ask them to disable non AMEX cards -- or find one that can.

Code: Select all

     function isAmex( cc )
     {
          return ( (cc.length == 15) && (cc.substring(0,2) == 34)
                               || (cc.substring(0,2) == 37) );
     }
Post Reply