polarbear Posted June 19, 2013 Share Posted June 19, 2013 Hello, 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. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted June 19, 2013 Share Posted June 19, 2013 To automatically disable the credit card fields on the order forms, all you need to do is add the following empty function to the gateway module code: function gatewayname_nolocalcc() {} 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.