aamche Posted December 1, 2009 Share Posted December 1, 2009 I'm writing code to work with the API and no matter how many examples I copy it simply doesn't work. It seems to authenticate fine, IP is allowed, it just can't process any actions (commands). I just keep receiving The following error occured: Command Not Found It seems pretty self explanatory, the value for action is wrong. I tried many out of the API documentation, which fail, so I'm not sure where to go from here. $postfields["username"] = $this->whmcs_user; $postfields["password"] = md5($this->whmcs_pass); $postfields["action"] = "encryptpassword"; $postfields["password2"] = 'xxxxxx'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 100); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields); $data = curl_exec($ch); curl_close($ch); $data = explode(";",$data); foreach ($data AS $temp) { $temp = explode("=",$temp); $results[$temp[0]] = $temp[1]; } if ($results["result"]=="success") { # Result was OK! } else { # An error occured echo "The following error occured: ".$results["message"]; } 0 Quote Link to comment Share on other sites More sharing options...
yabdab Posted December 15, 2009 Share Posted December 15, 2009 I am getting same thing on a new script I am working on. I can addclient, but then it fails on addorder and acceptorder ? 0 Quote Link to comment Share on other sites More sharing options...
realtorboutique Posted December 11, 2010 Share Posted December 11, 2010 I just recently encountered this exact problem but for me it is with the command updateinvoice. I can addorder, and a few other commands, but updateinvoice gives me the Command Not Found error. I don't understand why or how it's happening, but I need updateinvoice to work for a solution I am developing. 0 Quote Link to comment Share on other sites More sharing options...
oderland-david Posted December 14, 2010 Share Posted December 14, 2010 At least you guys are getting command not found - been trying with updateinvoice myself here and I'm getting a successful return value and invoiceid.. but the invoice isn't updated at all =( I've put in a ticket, awaiting their reply.. 0 Quote Link to comment Share on other sites More sharing options...
oderland-david Posted December 14, 2010 Share Posted December 14, 2010 It seems that updateinvoice is working for some fields, like paymentmethod.. but not for newitems and items fields. 0 Quote Link to comment Share on other sites More sharing options...
gcphost Posted February 27, 2011 Share Posted February 27, 2011 (edited) ** edit - my whmcs version doesnt support the feature, im on 4.2 and 4.3 has the updateinvoice feature Edited February 27, 2011 by gcphost 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.