tuga Posted January 15, 2021 Share Posted January 15, 2021 (edited) Hi, I'm developing a custom gateway payment module and it's already working for one time payments, but I'm wrapping my head around the best way to make it work with recurring subscriptions. I understand that on the first time the user chooses to subscribe, the payment gateway provides a unique subscriptionid (just like paypal or stripe do) and it's added to the tblhosting on the subscriptionid field, what I don't get is when the subscription renews, let's say after 1 month, how does the system handle this? How does it know which services/invoices need to renew or be marked as paid? Is there any tips that you can provide or a sample code/module that shows how recurring subscriptions are handled internally ? Any help will be very appreciated Thank you. Edited January 15, 2021 by tuga 0 Quote Link to comment Share on other sites More sharing options...
luciandex Posted October 7, 2021 Share Posted October 7, 2021 Some subscription options are based on the table `tblhosting` (or hosting if it hasn't a prefix). Next_due_date & next_invoice_date are some of the columns that show you some info about the subscription status. Based on that, you can search into whmcs code (on some free/unencoded versions eg. 7) to find where that columns are used and how to manage data. Hope someone find this a little helpful. :) 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.