Currently we do support only cPanel to automatically add the additional domain as addon domain. You can add your own module to support other hosting panels like DirectAdmin.
To create your own provisioning module, open the directory /modules/addons/addondomain/providers/ and and create a directory which has the same name as the WHMCS module.
If you are using the WHMCS server module 'directadmin', create a directory named directadmin and create inside the file 'directadmin directadmin.php'php .
Inside this file you must create the function "function addondomain_addDomain" addDomain which will get executed when a client activates a new free domain and his hosting product which uses the defined server module.
Here is an example, File: /providers/directadmin/directadmin.phpphp
Code Block |
---|
function addondomain_addDomain ($ProductDetails, $Domain, $ServerDetails) { $daUser = $ServerDetails['username']; $daHost = $ServerDetails['hostname']; $daPassword = $ServerDetails['accesshash']; $HostingUsername = $ProductDetails['tblhosting']['username']; // $ProductDetails gives you all informations from tblhosting // logActivity (json_encode($ProductDetails)); // $ServerDetails gives you all WHMCS server informations // logActivity (json_encode($ServerDetails)); $directadmin->addDomain->......; // result = success or fail // log = api response return array('result' => $result, 'log' => $apiresponse); } |
The parameter $ServerDetails
gives $ServerDetails gives you the server details and $ProductDetails
gives you an array with all relevant client product informations.
...