Jump to content

Duplicating account details to another database


dowzer

Recommended Posts

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.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated