Jump to content

Gateway module Development


proxy

Recommended Posts

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 ?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 weeks later...

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.

Link to comment
Share on other sites

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

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