fluffels Posted May 4, 2008 Share Posted May 4, 2008 I've been developing a new product which uses a MySQL backend. I'm sure there is a possibility of using WHMCS to automatically create the user's account after they've signed up for the product/service, in a similar way to WHM, but completely automatically. On Friday I contacted the WHMCS admin bods, but they said that a dev kit wouldn't be required, rather action hooks would. There doesn't seem to be much documentation really, so I'd like some advice. So, let's say the product id is 14, I'd need to extend the actionhook_ShoppingCartCheckout($vars) function to something like the following: function actionhook_ShoppingCartCheckout($vars) { if ($vars["Products"] == "14") { // code } } Can I just call a URL via cURL or include/require (does include/require work when calling a page based on another site)? Alternatively, should I just directly run the SQL commands to create the user? Also, can I return any result to be advised of success in WHMCS, or should I just modify the create-user script to send an email out? And, finally, can I set an account suspended (and subsequently unsuspended) if payment isn't made using another hook? (It doesn't seem obvious to me). Thanks edit: forgot to mention... The product signup form can include a space for username - can this be passed to the script for the purposes of creating/suspending/unsuspending the account? I'm going to worry about duplicate usernames at some point, but if that's not possible, I'll find another way. 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.