Jump to content
  • 0

Cusotm payment gateway that allows customer to enter a value


DennisHermannsen

Question

8 answers to this question

Recommended Posts

  • 0

Use _link function to return anything you need like follows:

<?php

function YourGateway_link($params)
{
    $output = <<<HTML
    <link href="your-style.css" rel="stylesheet" type="text/css" />
    <form method="post" action="somewhere-over-the-rainbow.php">
	<input type="text" name="something" value="1000">
	<button type="submit">Submit</button>
    </form>
HTML;

	return $output;
}

It will show a form with an input text where customers can enter your number and the submit button.

Link to comment
Share on other sites

  • 0

Hello! I was having exactly the same problem, and unfortunately the remote input is not an option, my provider does not provide the 

Iframe mentioned by WHMCS, and also, it looks like that remoteinput function has messed up with the store remote function as well, because now my payment gateway is broken.

My gateway requires name on card, ID and installments number, adding thesse fields to the checkout.tpl and creditcard.tpl does not fix the issue, these new fields 

dont get posted to the payment gateway.

 

What I did additional to create those fields in the tpl files, was adding an additional function to the submit button,

you need to retrieve those fields in your _capture function right? I used to diffferent methods, cookies and a mysql table.

 

With cookie you store those field values in a cookie, and then retrieve them back in the capture function, however sometimes cookies are not safe, and I did want to have a log

of those fields plus the "store credit card" chosen value.

 

So I created a new table in the database (paymen_cc_additional_fields for example) and save those field values in the database via ajax (had to create a php file to insert this data in the database too) and then read those values back from the payment gateway, using the email address as a key

 

It worked awesome, until the last update to 7.9 because now the workflow of tokenized gateways changed, but I have that posted in another topic

 

Hope my idea helps

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
Answer this question...

×   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