SilverNodashi Posted April 4, 2008 Share Posted April 4, 2008 Hi 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? 0 Quote Link to comment Share on other sites More sharing options...
aushosts Posted April 5, 2008 Share Posted April 5, 2008 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? 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted April 5, 2008 Author Share Posted April 5, 2008 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"> </form> 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. 0 Quote Link to comment Share on other sites More sharing options...
aushosts Posted April 5, 2008 Share Posted April 5, 2008 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 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted April 9, 2008 Author Share Posted April 9, 2008 ok, so if I understand you correctly, the user then won't need to login every month and submit the credit card details? 0 Quote Link to comment Share on other sites More sharing options...
aushosts Posted April 9, 2008 Share Posted April 9, 2008 Assuming its perfectly legit with your gateway - yea; thats my take on its function. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.