Jump to content

Invoice - Gateway based on currency


Recommended Posts

I'm trying to change the invoice template to show different payment gateways based on the currency on client's profile.

 

I tried the code bellow but one the currency is one (USD) it will always bring "Credit Card" selected with the PayPal button bellow it.

 

{if $allowchangegateway}
   <form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">
       <select name="gateway" onchange="submit()"> 
           { if $clientsdetails.currency eq 1 }         
               <option value="linkpoint" {if $paymentmethod eq "linkpoint"} selected="selected" {/if}>Credit Card</option>
               <option value="paypal" {if $paymentmethod eq "paypal"} selected="selected" {/if}>PayPal</option>            
           { elseif $clientsdetails.currency eq 2 } 
               <option value="custom_gateway" {if $paymentmethod eq "f2b"} selected="selected" {/if}>My Custom Gateway</option>
           {/if}
       </select> 
       <br /><br />
   </form>
{else}
{$paymentmethod}<br />
{/if}

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