WHMCS Module
From SolusVM
| PLEASE READ - This version is no longer maintained. Please see WHMCS_Module_v3 |
Contents |
Overview
This module is an addon for the popular WHMCS billing solution. It allows you to create, destroy, suspend, unsuspend, upgrade, downgrade and reboot virtual servers direct from WHMCS.
The module supports SSL mode as default with or without a valid certificate on the SolusVM master.
Please goto the new WHMCS Module wiki
Installation
Download
You can download the latest module version from your client area listed under your active license.
Upload
Once you have downloaded the <module>.zip file to your computer you need to extract the files using your favorite zip extraction program.
Now you should be presented with a folder called modules. You need to upload this folder to the root of your WHMCS installation.
The folder structure should be as listed below:
WHMCSroot/modules/servers/solusvm/config.php.new
socket.php
solusvm.php
Configuration
If this is a new installation you need to rename config.php.new to config.php
Module Connection Settings
You can change the default module connection settings by editing the config.php file directly:
$socketconfig['debug'] = 0; // ONLY USE THIS FEATURE IF YOU REALLY NEED TO AND NOT IN PRODUCTION! $socketconfig['timeout'] = 0; // You can usually leave this set to 0 $socketconfig['ssl'] = 1; // 1 = https 0 = http $socketconfig['port'] = 5656; // This is the port your master runs on
Creating API Users in SolusVM
To create an API user in SolusVM click Configuration >> API Users >> Create API User.
You will be presented with some fields like the image below:
The ID & Key are auto generated and cannot be changed, all you need to add is the IP address of your WHMCS installation and set it to active.
Adding a Master to WHMCS
Before you can configure your products to use the SolusVM module you need to add a master server to WHMCS.
In WHMCS select Setup >> Servers >> Add new server
Fill in the form as illustrated in the images below.
Now click Save Changes to add the master to WHMCS.
Creating a Product
In WHMCS select Setup >> Products/Services
Now click Create a New Product and fill in the form as illustrated in the image below.
Click Continue.
Now fill in all your product details. After that you need to click on Module Setting and select Solusvm from the dropdown menu.
Once the module has loaded you will be presented with the follow options as illustrated in the image below.
NOTE: When there isn't listed anything in the select boxes, select the virtualization type and click on the save button. After that you will see the select boxes filled.
First of all you need to select the master server you created in section 3.3 #Adding a Master to WHMCS then click Save Changes to load all the templates, plans and servers directly from the SolusVM master.
Once the page has reloaded you can select the OS template, default node, plan and the amount of ips (version 0.1 beta will only build a virtual server with 1 ip) you need for this product.
Click Save Changes then select the Custom Fields tab.
This is the important part! You need to create a custom field with the Field Name: vserverid , Field Type: Text Box and tick Admin Only.
Make sure it looks like this image below.
The custom field will hold to unique vserverid that is used within SolusVM.
When you have set the custom field, click Save Changes.
Thats it! the basic configuration is complete.
Optional Configuration
Client Operating System Chooser
This handy little feature lets you add a dropdown list of operating systems on the products order form allowing the client to choose the operating system they want without having to rebuild there vps after its been setup with the default template.
To set this up you need to go into each package and add a custom field with the Field Name: "Operating System" (without the quotes).
Select Field Type: Dropdown and tick Show on Order Form.
In Field Options you need to define your templates with a friendly name and filename.
Example: "fedora-9-x86|Fedora 9 32 Bit,centos-5.0-x86|CentOS 5 32 Bit, debian-5.0-x86|Debian 5 32 Bit"
The first part is the filename i.e fedora-9-x86 and the second part is the friendly name i.e Fedora 9 32 Bit. Both parts must be seperated with a | and each template entry must be seperated with a , (comma).
The filename must match the filename of the template as shown in SolusVM i.e fedora-9-x86.tar.gz needs to be listed as fedora-9-x86 , so the rule is just remove the .tar.gz when listing the templates in WHMCS.
Heres an image of what the custom field should look like.
Thats it, just click Save Changes and follow this procedure for every product you need to.
Default Server Override
You can override the default server that is defined in each of the products by setting a parameter in the master server access hash field.
For OpenVZ nodes the variable is: override_default_openvz_node For Xen nodes the variable is: override_default_xen_node
You must enter this variable in the access hash field and break each variable with a pipe '|' in the form of:
override_default_openvz_node=localhost|override_default_xen_node=xen01
Once this variable is set, all OpenVZ or Xen based packages using the SolusVM module will be created on this server.
Other variables will be available in future releases.
** Please note this is a beta version and may contain bugs








