dowzer Posted November 16, 2012 Share Posted November 16, 2012 When a client signs up via WHMCS how can I capture their account, product and license information and use it to populate another database? I am hoping to use WHMCS as a customer management and license system for a SaaS software application - today the client signs up to my application where there is a table called customers and one called license_keys. Using WHMCS I do not want them to have to signup twice so I have modified my WHMCS form to capture additional required information and I then want to be able to take a copy of the provided customer information and the generated license key and insert them into the relevant tables in my application so the users then will sign in via my application as they do today and then I will use AutoAuth for them to be able to view invoices etc I have downloaded a copy of my WHMCS database and have found all the tables and rows I need and running it as a script locally allows me to extract the info and move it to my database but how do I add this into the WHMCS workflow? Also in my local script I had to use the last added customer ID as the customer identifier (i.e. "SELECT * from tblclients order by id desc LIMIT 1") which worries me a little as there is the potential to not add a customer if something went wrong or if two customers completed an order at the same time and they got out of sync etc Is there a better way of doing this? I have 1500+ clients in my current application and I need to minimise the disruption to them as much as possible plus I don't want to have to recode my application license checking etc so this s the only way I can think of to do this. 0 Quote Link to comment Share on other sites More sharing options...
xauen Posted December 1, 2012 Share Posted December 1, 2012 do mysql replication 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted December 12, 2012 Share Posted December 12, 2012 Uhm... it's a really simple thing to do. Grab data in an action hook and insert them into all databases you want. 0 Quote Link to comment Share on other sites More sharing options...
dowzer Posted December 12, 2012 Author Share Posted December 12, 2012 I thought it was simple too but I cannot get it to work, nothing happens when the hook runs 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted December 12, 2012 Share Posted December 12, 2012 mmm... you could try to inlcude all variables in a mailto() to your email to test if it's a variable assignment problem or db connect one. 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.