Overview
Do you want to offer Virtualizor as an addon to your Dedicated server clients ? We have a WHMCS hook for that.
This guide will help you to setup WHMCS hook to license Virtualizor with your existing Modules. Setting this up is very easy.
Download and Upload
Download the Hook from the following links :
For PHP 5.3, PHP 5.4, PHP 5.5 : VirtLicenseHook php53.zip
For PHP 5.6+ : VirtLicenseHook php56.zip
For PHP 7.1+ : VirtLicenseHook php71.zip
Unzip it and upload the files virtualizor_license.php, virtualizor_license_conf.php and noc_api.inc to the following path /path/to/whmcs/includes/hooks/
Adding Configurable Option
Note : This is to ask your users if they want a Virtualizor license with their Dedicated server.
- First go to WHMCS admin panel -> Setup -> Products/Services -> Configurable Options
- Now create a Group or edit the existing group (Make sure that you have selected your product while adding the group).
- Now click on the Add New Configurable Option button.
- You will get a form similar to the below image.
- Fill in the details :
- Option Name => VPS Control Panel If you would like to use some other name please edit the value for $GLOBALS['conf_virtualizor']['fields']['VPS Control Panel'] in virtualizor_license_conf.php
- Option 1 => Virtualizor VPS Control Panel
- Option 2 => None
NOTE : The above values should be the same. Set the pricing as you wish.
Editing a Product/Service
This guide assumes you have already setup WHMCS and created your product. You can find detailed guides on the WHMCS Wiki. Once the Product is setup you can move ahead with testing the Module.
Editing the Settings
Edit the settings in virtualizor_license_conf.php
1. (Required) Edit the Virtualizor NOC account login details
$conf_virtualizor['noc_username'] = 'example'; //Virtualizor NOC username
$conf_virtualizor['noc_password'] = 'example'; //Virtualizor NOC user password
Enter the Virtualizor NOC account details i.e. Virtualizor Username and Virtualizor Password. These details are required as the licenses will be issued under this account.
Note : This account should be a NOC account because the API can be used only by NOCs. You can register as a NOC partner here
2. (Required) Edit the pid of the products which are Dedicated servers.
$conf_virtualizor['dedicated_pid'] = array();
3. (Optional) Edit the pid of the products you want this hook to be executed for. By default this hook will be executed for the products that have the Configurable option (you created above) assigned.
$conf_virtualizor['product_id'] = array();
4. (Optional) If you would like to debug set the debug mode to 1 :
$conf_virtualizor['debug'] = 1;
Testing the Setup
You can test the setup by making a DUMMY Order and accepting the order.
Support
If you need any assistance then please contact Virtualizor Support.