Jump to content
lukewd

Different credit card type for different gateway

Recommended Posts

I am trying to achieve the following: a way to specify different credit card types available to different merchant gateways?

 

We have 2 merchant gateways on our system, one which we use to process only Visa & Mastercard, and another that is for Amex only. However, when a client is checking out, the order form shows all three card types (as set in the "General Settings --> Invoices --> Available Credit Card Types").

 

On the order form, I would like for it to be possible to only show Visa & Mastercard in the drop down menu of the one gateway, whilst only showing Amex for the other?

 

Is there any kind of "if" statement I could use to say "if gateway x", only show dropdown options for Visa, and Mastercard, and "if gateway y" then only show Amex?

 

Or any other suggestions?

Share this post


Link to post
Share on other sites

You can achieve this by modifying the viewcart.tpl template file in /templates/orderforms/{yourtemplate}/viewcart.tpl

 

Use some smarty logic and JavaScript to display what options you want.

 

Place a jQuery listener on the change event for your gateway radio options or dropdown. When a specific gateway is selected populate the credit card form Card Type dropdown with the options you want for that specifc gateway.

 

Then just rename your gateways to something like "Visa / MasterCard" and "Amex / Discover".

 

If you need more help just ask. This should get you going though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated