Jump to content

Question about creating a gateway module


Recommended Posts



We’re integrating with a PSP which offers API access, as well as support for redirects (similar to a normal 3rd party gateway). Using redirects, we can still have them return a token to us, so that we can charge the customer's credit card thorough the API in the future. This way, we avoid PCI liability, which is desireable.


It is my understanding that for the redirect to be in place when first signing up, we need to use the _link function in the gateway module. But then, what about future captures? Which function in the module does WHMCS look for?


I would assume that this would be the _capture function. But, according to my developer, if both the _capture and _link functions are present in the module, then the user will see CC input fields in the WHMCS order form (and we don't want that, since we're using redirects).


So, according to him, we're left with two options:

- Either modify the order form/registration templates to hide the CC fields, or

- Create a hook which runs daily (and perhaps also after placing orders) and does the actual capturing of funds for due invoices


My objection against the latter is that daily capturing of due invoices is part of the WHMCS core functionality and creating a hook as such is just creating redundant functionality. Also, developing a gateway module depending on a hook doesn’t sound too good in my ears – capturing payments should be possible within the module without any further dependencies.


The former is a viable option, but still, it seems strange that we cannot achieve this functionality without modifying the design templates.


Perhaps some of you have a different take on it? I would appreciate some feedback.



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