proxy Posted July 11, 2016 Share Posted July 11, 2016 I have searched and researched time after time on how to develop WHMCS gateway module and failed again and again. I have a local Credit card company that provides me with API and allow to use tokens. I have created a sample module for Credit card payment and it works, now i want to embed Tokens, so what i did is after the client pays with a credit card for the first time, im using capsule to save the token and expiration date to the database. so far so good, and everything works. now when invoice creates i want to make a charge for the client automatically , so ive used the hook before CC and i am able to charge the client using token, however as im not using it via "payment gateway" but via a hook, i dosnt add transaction , convert the invoice to paid and still emails the client that he needs to pay. so what exactly am i missing here ? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted July 11, 2016 Share Posted July 11, 2016 why are you making charges through ActionHook instead of using core function to do that? if you are forced to use ActionHook for this and it already capture that money and your problem is to save/record the transaction, then use the addInvoicePayment function 0 Quote Link to comment Share on other sites More sharing options...
proxy Posted July 13, 2016 Author Share Posted July 13, 2016 As i said, it was hard for me to understand how to build the payment process as the WHMCS documentation is lacking the explanation on how to system works with tokens. Today i am able to get credit card processing when the client enter the CC details. i also get a response with the TOKEN and expiration date which i save on the database. now all im missing is how to do the recurring payment with the token, i know the code to do it via php, just missing the WHMCS part. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted July 13, 2016 Share Posted July 13, 2016 in WHMCS Github -> Merchant Gateway module, everything is there 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 13, 2016 Share Posted July 13, 2016 https://github.com/WHMCS/sample-merchant-gateway 0 Quote Link to comment Share on other sites More sharing options...
proxy Posted July 13, 2016 Author Share Posted July 13, 2016 Hey Brian and sentq, I really appreciate that you guys are helping me! I already looked over the Merchant gateway module on Github and on WHMCS developer documentation. The problem is that im not using a Merchant gateway - the client cannot enter CC details on my WHMCS system. We have a 3rd party gateway which on the first payment i redirect to their page using the 3rd party gateway module, i charge the client for the first time and in response i get Token + EXP date. i save those on the DB using capsule and everything is great. only problem is now how to make it that when an invoice is created or client purchase another service , the billing will be automatically and the client wont need to login and pay manually. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted July 13, 2016 Share Posted July 13, 2016 Hey Brian and sentq,I really appreciate that you guys are helping me! I already looked over the Merchant gateway module on Github and on WHMCS developer documentation. The problem is that im not using a Merchant gateway - the client cannot enter CC details on my WHMCS system. We have a 3rd party gateway which on the first payment i redirect to their page using the 3rd party gateway module, i charge the client for the first time and in response i get Token + EXP date. i save those on the DB using capsule and everything is great. only problem is now how to make it that when an invoice is created or client purchase another service , the billing will be automatically and the client wont need to login and pay manually. for this exactly you need to use Merchant Gateway instead of Redirect, you will save CC token and for future payment you will use "Capture" function 0 Quote Link to comment Share on other sites More sharing options...
proxy Posted July 13, 2016 Author Share Posted July 13, 2016 im sorry but i just cant understand... if im using _capture for the API to charge the TOKEN. how do i do the redirect for the first CC insert on the external gateway page ? also, ive added _capture and rewritten the module for merchant gateway when i add new order it just asks the client to pay, and dosnt do the billing automatically 0 Quote Link to comment Share on other sites More sharing options...
ThreePointNZ Posted August 9, 2016 Share Posted August 9, 2016 Hi there, I am in the process of writing my own module for a local merchant. They use Tokens as well and I have the exact same problem as @proxy. The _capture does a background process which requires your server to be PCI compliant. The _link does a redirect to merchant for Payment. I'm looking forward to a response on this. 0 Quote Link to comment Share on other sites More sharing options...
interhost.il Posted August 13, 2016 Share Posted August 13, 2016 Hi there,I am in the process of writing my own module for a local merchant. They use Tokens as well and I have the exact same problem as @proxy. The _capture does a background process which requires your server to be PCI compliant. The _link does a redirect to merchant for Payment. I'm looking forward to a response on this. That's correct, the chd shouldnt be passed by server 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.