WHMCS Direct Provisioning
The WHMCS Direct Provisioning module is a simple module that can create
, terminate
, suspend
and unsuspend
servers with a direct login bridge between WHMCS and VirtFusion.
How it works
When a customer orders a server, they use the standard ordering system of WHMCS but don't have all the confusing options of choosing a root password, operating system etc... they just order and make payment.
Once payment is complete, they have an option to directly login to VirtFusion to set up their server.
Which takes them straight to the setup page.
Download & Install
Download the latest version of the module.
Version | Released | Link | Notes |
---|---|---|---|
2.3 | 2022-08-18 | download | Requires VirtFusion v1.7.3 or higher |
2.2 | 2022-07-01 | obsolete | |
2.0 | 2022-06-05 | obsolete | Requires VirtFusion v1.6.1 or higher |
1.4 | 2022-04-06 | download | |
1.3 | 2022-02-02 | obsolete | |
1.2 | 2022-01-03 | obsolete | |
1.1 | 2021-12-16 | obsolete | |
1.0 | 2021-11-29 | obsolete |
Once downloaded, extract the archive and upload the contents of the upload
directory to the root of your WHMCS installation.
Configuration
VirtFusion API credentials
As a VirtFusion administrator, create a new global API token (System > API > Create Token)
Fill in the Name
field and enter the IP of your WHMCS installation in the Access
field (This is optional, entering an IP will lock requests to the specified IP). Then click Create
.
Copy the generated API key to a safe place. We will need it later.
WHMCS setup
Create a server
As a WHMCS administrator, add a new server (System settings > Servers).
- Give it a
Name
- Enter the
hostname
of your VirtFusion management UI - Select
Module
VirtFusion Direct Provisioning - Enter the VirtFusion API token in the
Password
field - Tick
Secure
- Save
Create a server group
Create a new Server Group and add the previously created server to it.
Create a product group
Create a new Product Group (System settings > Products/Services).
Create a product
Create a new Product.
Product Type
OtherProduct Group
should be the one you just createdProduct Name
Module
VirtFusion Direct Provisioning
Once the product is created, click the Module Settings
tab.
Server Group
select the server group you created earlierHypervisor Group ID
can be found in VirtFusion (Compute Resources > Hypervisor Groups > ID (table column))Package ID
can be found in VirtFusion (Packages > ID (table column))
Continue to configure the product as normal.
Configurable Options
The following configurable options are available.
Name | Description |
---|---|
IPv4 | The amount of IPv4 address to be added to the server on creation. This will override the default IPv4 specified in the product module settings. |
Package | The ID of a package in VirtFusion. This will override the default package specified in the product module settings. |
Location | The ID of a hypervisor group in VirtFusion. This will override the default hypervisor group specified in the product module settings. |
Storage | An amount of storage in GB for the primary disk. This will override the storage value for the specified package. |
Memory | An amount of memory in MB. This will override the memory value for the specified package. |
Bandwidth | An amount of traffic in GB. This will override the traffic value for the specified package. |
Inbound Network Speed | The inbound network speed in kB/s in the range of 0 - 9999999999 (0 = unlimited). This will override the inbound network speed value for the specified package. |
Outbound Network Speed | The outbound network speed in kB/s in the range of 0 - 9999999999 (0 = unlimited). This will override the outbound network speed value for the specified package. |
CPU Cores | An amount of CPU cores. This will override the CPU cores value for the specified package. |
Network Type | The ID of a network profile. This will override the network profile for the specified package. |
Storage Type | The ID of a storage profile. This will override the storage profile for the specified package. |
You must use the exact name specified for a configurable option to work, however, the names can be overridden using configurable option mapping.
To use config option mapping you may rename ConfigOptionMapping-example.php
in the config
folder to ConfigOptionMapping.php
(it won't be overwritten on updates) and edit the values in the array to match your configurable option names.
return [
'ipv4' => 'IPv4',
'packageId' => 'Package',
'hypervisorId' => 'Location',
'storage' => 'Storage',
'memory' => 'Memory',
'traffic' => 'Bandwidth',
'networkSpeedInbound' => 'Inbound Network Speed',
'networkSpeedOutbound' => 'Outbound Network Speed',
'cpuCores' => 'CPU Cores',
'networkProfile' => 'Network Type',
'storageProfile' => 'Storage Type',
];
Do not edit the array keys, these must remain as specified in the script.
Examples
Location selector (optional)
You may use configurable options to enable a location selector for your order forms. A Location configurable option will override the default Hypervisor Group ID
configured in the package.
The option name must be Location
(if you are not overriding the default name) and options must use the format Hypervisor Group ID|Friendly Name
.
IPv4 selector (optional)
You may use configurable options to enable a IPv4 selector for your order forms. A IPv4 configurable option will override the Default IPv4
configured in the package.
The option name must be IPv4
.