Jump to content

Add total amount to total field in payment gateway iframe in viewinvoice.tpl


hsnuwaninfo

Recommended Posts

Hi,

 

I created a custom payment gateway module which uses iframe to submit payment information. The issue is I need to populate total amount in "Amount" field in the iframe. I got the total from "$total" in http://docs.whmcs.com/PDF_Invoice_Customisation#Displaying_Custom_Fields. But it shows "Rs19.00SLR". I just want only 19.00.

 

Is there any way to do this? I tried to write custom php code inside viewinvoice.tpl as {php} {/php} it gives a blank page.

 

A screen shot is attached with this for more clarification. There total is displayed instead for company name for testing.Screenshot from 2015-11-03 11:07:06.png

 

Any help is highly appreciated.

Link to comment
Share on other sites

Hi,

 

Thank you for the help. Actually I made the custom payment gateway module. The payment gateway provider gave this iframe method because we are not PCI complaint. I can get the total from your method. But the thing is Amount text field is by default empty. I need it to assign total to this field. I tried to assign via iframe. But inside the iframe is different url(payment gateway provider's url). whmcs has differnt urls. So it gives "error permission denied to access property document iframe". I tired to google for a solution for this error. But did not succeed. Have any one encounter problem like this?

 

Any help is highly appreciated.

Link to comment
Share on other sites

Hi,

 

I got a way to tackle the above issue. Actually it is on the payment gateway issuer's documentation which I missed. The solution is you can pass the amount as an query string in iframe url .

 

<iframe id="myiframe" src="paymentgateway.com?amount=50">

<p>Your browser does not support iframes.</p>

</iframe>

 

Thanks for the help.

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