Jump to content

martyn1

Retired Forum Member
  • Posts

    19
  • Joined

  • Last visited

Everything posted by martyn1

  1. "Well it just started working" this way:- add_hook("ClientAdd",0,"client_signup"); The fate spinners are laughing at me today.
  2. When I call client_signup($vars) with dummy data it works however it is not being called by WHMCS. I have tried both methods:- add_hook("ClientAdd",0,"client_signup", ""); and add_hook("ClientAdd",0,"client_signup"); Any ideas what else I might try? Thanks, Martyn
  3. I can answer this one for myself now. In brief its a no, however, a kludgy work around is to include('myfile.php') them.
  4. Thanks Simon, I am using the 4.12, I had the additional parameter as shown in the changes for 4.12, I'll try it without:- function client_signup($vars) { //Create ventrino client account $syspwd = 'xxxxx'; $url = 'http://www.ventrino.com/dev/client.php'; $postfields["system"] = "create_client"; $postfields["syspwd"] = md5($syspwd); $postfields["name"] = $vars["FirstName"]." ".$vars["LastName"]; $postfields["email"] = $vars["Email"]; $postfields["password"] = $vars["Password"]; $postfields["whmcs_id"] = $vars["ID"]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $results= curl_exec($ch); curl_close($ch); } add_hook("ClientAdd",0,"client_signup"); I have placed it in includes/hooks/client_signup.php Thanks, Martyn
  5. In the Wiki at http://wiki.whmcs.com/Action_Hooks it shows three parameters to add_hook but in the latest release http://wiki.whmcs.com/Version_4.0_Release_Notes#Action_Hooks it shows 4:- Original Updated I have been trying both methods without much success at the moment and this is one curve ball I would like dismissed so I can move on to the next! Thanks, Martyn
  6. I have upgraded to 4.12 from 3.x and read about actionhooks at http://wiki.whmcs.com/Version_4.0_Release_Notes#Action_Hooks In the old method I added a number of functions that were called by the hooks, can I do the same with this new method? Here's some pseudo code for the new method, would this work?:- function actionhook_ClientSignup($vars) { if($vars["FirstName"] == "Tiger") do_something_wild($vars); } add_hook("ClientAdd",0,"actionhook_ClientSignup",""); function do_something_wild($vars) { // Code to handle wild customer orders } Thanks, Martyn
  7. With help from Chris@netearth I managed to complete a purchase for testing. Everything appears to be OK with the following exceptions: 1. Because my first test failed I credited the invoice and began a second transaction. Everything appeard to work except the new invoice did not offer to make payment with the funds already on the account. I accepted the default (Paypal) but after clicking the submit button I was left on a blank page, blank, all except for the word dnsmail, I checked the source to see if there were any headers but there were none. Just the word dnsmail. 2. In the customer client area the order is still Pending. The invoice is showed as paid. I can manually enable the domain through the admin CP but it would be good if domain purchases could complete without my intervention if possible. 3. I received an email saying there was an error and here's what it said:- Client ID: 0000000001 Domain: xtratrix.com Error: java.lang.String 4. An email arrived telling the buyer he had not paid yet. Followed by one congratulating him saying the domain had been registered, and yet another saying payment had been paid. I realise the final two emails were correct and I'm impressed that WHMCS worked out what needed to be done, perhaps responding to the errors as they happened. It would be better to let people select funds already on account rather than forcing them to select a merchant at payment time. Overall a lot of complex logic ran smoothly, a little help ironing out the final wrinkles would be great. Kind Regards, Martyn
  8. Hello, I have a Spanish Paypal account which reverts to Spanish unless the following hidden variable is added to payment forms:- <input type="hidden" name="lc" value="US"> The "lc" determines the language used on Paypal forms and "US" is used to indicate English. As all my customers speak English and none of them Spanish I need to add this code between all Paypal form tags. Can anyone tell me how I do this? Many thanks in advance. Martyn
×
×
  • 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