dreas Posted August 10, 2010 Share Posted August 10, 2010 We're developing a custom payment gateway. How can we trigger our payment module to execute the automatic recurring billing with our payment service when a new invoice is generated? Do we have to hook-in with "InvoiceCreated - invoiceid" or is there some cleaner method for this? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 10, 2010 Share Posted August 10, 2010 As far as I know all that is handled by internal functions. If a particular service is linked to your payment gateway module, it should automatically attempt to charge any new invoices to this gateway. 0 Quote Link to comment Share on other sites More sharing options...
dreas Posted August 10, 2010 Author Share Posted August 10, 2010 Can you be more specific? How does WHMCS know which invoice is recurring/nonrecurring? What function is handling it? How does WHMCS find which call to execute with the payment provider? Is there an example gateway module that is opensource and applying this system? 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 10, 2010 Share Posted August 10, 2010 Theres is a payment gateway development kit on the website, I would look at that first: http://www.whmcs.com/members/dl.php?type=d&id=15 I'm not sure what you mean by "how does it know what invoices are non-recurring". Its not the invoice that determines that, its the service you have selected. If you have a recurring service (like web hosting for instance), its going to create an invoice on the predefined date every billing cycle. The payment gateway doesn't need to know if its a recurring payment or not. 0 Quote Link to comment Share on other sites More sharing options...
dreas Posted August 10, 2010 Author Share Posted August 10, 2010 (edited) Theres is a payment gateway development kit on the website, I would look at that first: http://www.whmcs.com/members/dl.php?type=d&id=15 Thanks for the link. We looked at that, and there are no references to recurring billing. I'm not sure what you mean by "how does it know what invoices are non-recurring". Its not the invoice that determines that, its the service you have selected. If you have a recurring service (like web hosting for instance), its going to create an invoice on the predefined date every billing cycle. The payment gateway doesn't need to know if its a recurring payment or not. All our services are recurring. WHMCS indeed generates the invoices correctly, but how does WHMCS execute the automatic payment request with our payment provider? That needs to be programmed somehow? Also some payment methods are recurring (like creditcard) and others are not (like banktransfers), we somehow need to tell WHMCS which payment methods can be automatically executed? There doesn't appear to be any documentation anywhere about this. Edited August 10, 2010 by dreas typo 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 10, 2010 Share Posted August 10, 2010 I would suggest opening a ticket. I'm sure theres a variable that gets set somewhere that tells WHMCS that the module supports recurring payments. Bank transfers and such wouldn't have a "payment gateway" in the traditional sense since it is a manual process. 0 Quote Link to comment Share on other sites More sharing options...
dreas Posted August 10, 2010 Author Share Posted August 10, 2010 I would suggest opening a ticket. I already did 02/08/2010 12:30 .. since I haven't received a response yet am trying my luck here. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted August 10, 2010 WHMCS Support Manager Share Posted August 10, 2010 That seems like quite a while ago. Feel free to PM your ticket ID to me and I'll check the status of the ticket. 0 Quote Link to comment Share on other sites More sharing options...
dreas Posted August 11, 2010 Author Share Posted August 11, 2010 Answer from support (in case anyone else has this question): The _capture function in the module is what will handle the recurring billings. _capture will be called any time an invoice is due for payment and then the logic should be check if the user has previously paid and has a reference setup for repeat billing and if so, process the charge with that, otherwise just return from the function and wait for the client to login and make payment manually. 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.