Jump to content

how to setup a Credit Payment system

Recommended Posts



Unfortunately we can't use Paypal, Worldpay or any of the other payment gateways in South Africa. But we do have a few Credit Card payment gateways whom I could use. But they don't offer recurring billing options, they're really only meant to be used with shopping cart type sites.


Basically on the checkout process, the user gets redirected to their website, complete the CC details, submit the form, and then their site sends a confirmation string back to the shopping site to say the order is complete.


Regardless of what I tell them, this is the way they operate. It has todo with our laws apparently, yet it doesn't make much sense.


So, I would like to know, is there a way, if I create a new / modify an existing credit card payment module, to save the client's CC details in the database, and when when wHMCS wants to bill the client, have a script that will connect to the payment gateway's script, do the payment, and then mark the invoice as paid. I'm thinking this can be done with CURL, but where do I start?


Has anyone ever done anything like this?

Link to comment
Share on other sites

I think you'll need to get the customer to go the hosted page each month; because I'm not sure you could phase the output to work out if it was successful or not...


What I'd recommend is asking them if they have a XML interface or other type of API over their standard hosted payment pages? Just out of interest which gateway is this for?

Link to comment
Share on other sites

This is how the forum looks like that gets submitted:


<form method="POST" action="https://gateway/vvonline/ccform.asp ">
<input type="hidden" name="m_1" value="testuser"> 
<input type="hidden" name="m_2" value="testpass"> 
<input type="hidden" name="m_3" value="654321"> 
<input type="hidden" name="p1" value="0291"> 
<input type="hidden" name="p2" value="Uniquekkap"> 
<input type="hidden" name="p3" value="Example Goods"> 
<input type="hidden" name="p4" value="39.99"> 
<input type="hidden" name="p10" value=""> <
input type="hidden" name="Budget" value="Y"> 
<input type="hidden" name="m_4" value="Extra 1"> 
<input type="hidden" name="m_5" value=" Extra 2"> 
<input type="hidden" name="m_6" value=" Extra 3"> 
<input type="hidden" name="m_9" value="jack@test.com"> 
<input type="submit" value="Pay by Credit Card"> 


It then returns some values, like clientid, amount, reference, and status, reason to our web page, telling us whether it's been accepted or not. So it's almost fully automated, except that the client has to type in his CC details and click accept.


The problem is, this isn't going to automate the payment, and I have to be honest, I don't think my clients will want to be told / forced to login to their WHMCS control panel every month and submit their CC details.

Link to comment
Share on other sites

Oh thats super easy than :)


Email WHMCS support and ask for the payment gateway documentation/demo script/thingy.


All that info can be submitted using a POST command to their script, via whmcs. You than need to somehow phase the output accordingly and submit payment back to the gateway script...


If I'm allowed to post code here I would show you how easy it is :)

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.

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