Emhope Posted January 28, 2014 Share Posted January 28, 2014 Hi, I'm trying to integrate the WHMCS API with our current system. I am able to add clients through the api but when I try to register a domain I get the following error message "The following error occured: Domain Not Found". I've setup Nominet as my domain registrar. I'm not 100% sure how to test this is working but all of the settings seem correct. I am using the code from this website to interact with the api. Is there something I have missed or failed to setup? I'm not sure if this matters but I don't need whmcs to process the payments as our current system takes care of this. I was hoping I could have whmcs register and point the domain for us and continue to use our system to do the rest. $url = "#/clients/includes/api.php"; # URL to WHMCS API file $username = "#"; # Admin username goes here $password = "#"; # Admin password goes here $postfields["username"] = $username; $postfields["password"] = md5($password); $postfields["action"] = "domainregister"; $postfields["domainid"] = "domain.co.uk"; $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"]; } Thanks for any help 0 Quote Link to comment Share on other sites More sharing options...
debasishM Posted April 6, 2023 Share Posted April 6, 2023 Domain type should be register, if you do not have domainid, you can pass domain and domaintype in AddOrder. 'domaintype' => 'register', 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.