Jump to content

Different credit card type for different gateway


lukewd

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?

Link to comment
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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

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