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.4 | 2024-06-12 | download | Requires VirtFusion v3.0 or higher |
2.3 | 2022-08-18 | obsolete | 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 | obsolete | |
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
.
Emails
It's a good idea to assign a welcome email to each of your products so customers are informed when their server is ready. Here are a few examples (and yes, we know—AI at its finest!).
Example 1
Hello {$client_name},
Your server has been successfully created and is ready for you to configure.
You can manage all aspects of your server using our best-in-class, fully featured control panel. To access the control panel, please visit {$whmcs_url}, select your server from the list of services, and click the "Open Control Panel" button.
Enjoy your new server from all of us at {$company_name}!
Example 2
Hello {$client_name},
Your server has been successfully created and is now ready for you to configure.
You can manage every aspect of your server using our best-in-class, fully featured control panel. Here’s what you can do:
- Choose from a comprehensive range of operating systems.
- Use a Custom ISO for your server.
- Monitor your server with detailed statistics.
- Access power functions to control your server effortlessly.
To get started, visit {$whmcs_url}, select your server from the list of services, and click the "Open Control Panel" button.
Enjoy your new server from all of us at {$company_name}!
Example 3
Hey {$client_name},
Guess what? Your server’s finally been created. Took long enough, right? Anyway, it’s sitting there, waiting for you to get off your butt and configure it.
You’ve got this fancy-schmancy control panel at your disposal—yeah, we know, we’re the best. To get to it, drag yourself over to {$whmcs_url}, pick your server from the list (you do remember which one it is, right?), and hit the "Open Control Panel" button. It’s not rocket science.
So, go ahead and enjoy your shiny new server. And if you mess it up, well, that’s on you. Cheers from the sarcastic bunch at {$company_name}!
Example 4
Dear {$client_name},
We are pleased to inform you that your server has been successfully created and is now ready for configuration.
You may manage every aspect of your server through our state-of-the-art, fully featured control panel. To access this control panel, kindly visit {$whmcs_url}. Upon logging in, please select your server from the list of available services and click the "Open Control Panel" button.
We trust that this server will meet your expectations and serve your needs effectively. Should you require any assistance, our team is at your service.
Warm regards,
The Team at {$company_name}