RustBuck Posted July 31, 2011 Share Posted July 31, 2011 Hello, I'm selling a web service to my clients, coded in PHP. Can I check, in PHP, if the client is late on payment or hasn't paid, so I can then deny them access? I was looking throught the API and I couldn't really find it... 0 Quote Link to comment Share on other sites More sharing options...
0 othellotech Posted August 1, 2011 Share Posted August 1, 2011 Not sure about the API but's it's simple enough with a query - just look for invoices for the user with status unpaid, which have an invoiceitem matching the hosting id i.e. select (whatever) from tblinvoices as i, tblinvoiceitems as ii where i.userid=(someone) and i.status="Unpaid" and ii.invoiceid=i.id and ii.relid=(the id from tblhosting) and ii.type="product" 0 Quote Link to comment Share on other sites More sharing options...
0 ABetterDealForAll Posted August 1, 2011 Share Posted August 1, 2011 HI RustBuck, The one think I love about WHMCS is it's simple database design/structure so even without an API you can easily query the database to get all sorts of info. In your, the invoices are stored in one table which has the due date and the Paid date or status as fields so you could easily using the client id read the DB and check what you want to do. 0 Quote Link to comment Share on other sites More sharing options...
0 laszlof Posted August 2, 2011 Share Posted August 2, 2011 You could step through the GetInvoices API function (http://docs.whmcs.com/API:Get_Invoices) and check for overdue or otherwise unpaid invoices. 0 Quote Link to comment Share on other sites More sharing options...
Question
RustBuck
Hello,
I'm selling a web service to my clients, coded in PHP. Can I check, in PHP, if the client is late on payment or hasn't paid, so I can then deny them access? I was looking throught the API and I couldn't really find it...
Link to comment
Share on other sites
3 answers to this question
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.