Jump to content

show paymentbutton per each gateway


yarantoos

Recommended Posts

it's basically going to be a variation on the idea in the thread below... you'll replace {$gatewaydropdown} with a foreach loop of $gateways and show an image for each gateway.

 

http://forum.whmcs.com/showthread.php?85483-Tutorial-How-to-replace-Payment-Gateways-%28e-g-Paypal%29-text-with-image-or-logo

 

that said, there can be hidden fields added to the page dependent upon the choice of gateway from the dropdown (occurs with Paypal, probably other gateways too)... how you would get around that if you replace the dropdown and all the gateways are shown at the same time, i'm not sure. :?:

Link to comment
Share on other sites

I replaced {$gatewaydropdown}

to below code :

<p class="paymentmethods">{foreach key=num item=gateway from=$gateways}<label><input type="radio" name="paymentmethod" value="{$gateway.sysname}" onclick="{if $gateway.type eq "CC"}showCCForm(){else}hideCCForm(){/if}"{if $selectedgateway eq $gateway.sysname} checked{/if} />{assign var="paylogo" value="images/`$gateway.sysname`.png"}

{if file_exists($paylogo)}

<img src={$paylogo} />

{else}

{$gateway.name}{/if}</label><br />{/foreach}</p>

 

But it shows default gateway only.

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