batoo Posted December 21, 2013 Share Posted December 21, 2013 Hello everyone, I want to develop pay as you go module. The requirements should be like this: 1) Monthly billing cycle 2) Add order 3) Accept order, don`t create invoice and next due date should be next 1st of month. 4) Before generating invoice, i need to change/add items with prices. I searched a lot but i`m not sure how to do this. I have something in my mind so if anyone can confirm if my way is correct, ill thanks you. I use WHMCS only as backend system. This mean i have totally custom ASP.NET website where this site communicate with WHMCS via extended api and AutoAuth tricks . 1) Add order via api with "noinvoice" and "noinvoiceemail" values. 2) Change next due date to next 1st of month. 3) Add hook "InvoiceCreationPreEmail" to calculate usage and change items and prices. Scenario: 1. Today: 21/12/2013 2. Add order 3. Change product next due date to 1/1/2014 4. On 1/1/2014 when the invoice is generated, i need to update items and prices. One problem witch i see here is that i have 10 days before the due payment date to generate invoices for monthly products, so product invoice will be generated today (i`m not sure). If i add hook function to check and delete all invoices who are created for that product before 1st of month, than i have problem because WHMCS never create another invoice for same date. I can make anything that you can suggest me, no matter if that use api, custom api function, direct mysql, custom cron jobs etc etc... 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.