[2024-04-22 19:07:52] Core(433): E_WARNING: Undefined array key "billic_lock_session_ip", File: /site/html/Modules/Core.php
Documentation > Modules/Addons > WHMCS Module

WHMCS Module

Module Preview

Our WHMCS Module allows you to automate VPS orders. From Creation to Upgrades to Termination, our module is designed to make your daily tasks as easier than ever before.

Installation

  1. Download WHMCS Module  
  2. Unzip the archive.
  3. Create the folder modules/servers/virtpanel/ inside your WHMCS installation.
  4. Upload the contents of the zip file to the folder you created.

Create an API Key

  1. Login to your VirtPanel control panel.
  2. Go to "API Access".
  3. Click on the "Add Access" link.
  4. For "IP Address", enter the main IP Address of the server where your WHMCS installation exists.
  5. Click on Add. A random API Key string will be generated.
  6. Go back to the API Access page.
  7. Copy the API Key that was generated. Keep this in a safe place. You'll need it for the next step.

Server Settings inside WHMCS

  1. Add a Server to WHMCS.
  2. For "Name", put anything you want to call your control panel.
  3. "Hostname" AND "IP Address" should be the domain to access your control panel, for example: yourcompany.virtpanel.com
  4. For "Type", select "VirtPanel".
  5. For "Username", put the username of the admin account of the control panel. The default is: admin
  6. For "Password", put the API Key that you got from VirtPanel in the first step.
  7. LEAVE "Access Hash" empty. VirtPanel does not use this setting.
  8. Click on Save.

Product/Service Settings inside WHMCS

  1. Create the "Product/Service" inside WHMCS.
  2. For "Product Type" select "Other".
  3. Go to the "Module Settings" tab.
  4. For "Module Name", select "VirtPanel". The page will refresh.
  5. You have two options. Create a resource plan in VirtPanel and put the name of the plan into WHMCS to set all the resources. Alternatively, you can set the plan to "-custom-" and use the steps below to setup a "Configurable Options" group which will allow your clients to select their own resources.

(Optional) Setup a "Configurable Options" group inside WHMCS

  1. Set the Plan to -custom- which will make VirtPanel not use a resource plan when creating a VPS. It will use all the limits which WHMCS pass.
  2. Go to Setup -> Products/Services -> Configurable Options. Create a new Group. Name: VirtPanel VPS Limits
  3. Create a new Option. The example below shows Disk Space.
  4. All of the following options are required because VirtPanel will not assume any default limits.
    Option Name (Code|Friendly Name) Unit Option Example Notes
    disk_quota|Disk Space Megabyte (MB) 10240|10 GB
    disk_speed|Disk Speed Megabits Per Second (Mbps) 10|10 Mbps
    disk_iops|Disk IOPS 1 300|300 IOPS Input/Output operations per second
    memory|RAM Megabyte MB 1024|1 GB
    cpu_clock|CPU Clock Percent per CPU core 100|100% Use cpu_clock or cpu_ghz. Do not use both. This is per-CPU. Set to a very high value such as 10000 to limit to 100% no matter how many cores.
    cpu_ghz|CPU GHz GHz per CPU core 1.5|1.5 GHz Use cpu_clock or cpu_ghz. Do not use both. This is per-CPU. Set to a very high value such as 10000 to limit to 100% no matter how many cores.
    cpu_num|CPU Cores CPU Cores 1|1 Core
    bandwidth|CPU Cores Gigabyte GB 1000|1 TB
    port_speed|Port Speed Kilobits per Second Kbps 102400|100 Mbps
    allow_rebuild|Allow Reinstall 0|No or 1|Yes Allows the client to reinstall

Configurable Option SQL Cheat

INSERT INTO `tblproductconfiggroups` (`id`, `name`, `description`) VALUES (10000, 'VirtPanel VPS Limits', '');

INSERT INTO `tblproductconfigoptions` (`id`, `gid`, `optionname`, `optiontype`, `qtyminimum`, `qtymaximum`, `order`, `hidden`) VALUES
(10000, 10000, 'disk_quota|Disk Space', '1', 0, 0, 10, 0),
(10001, 10000, 'disk_speed|Disk Speed', '1', 0, 0, 11, 1),
(10002, 10000, 'disk_iops|Disk IOPS', '1', 0, 0, 12, 1),
(10003, 10000, 'memory|RAM', '1', 0, 0, 20, 0),
(10004, 10000, 'cpu_clock|CPU Clock', '1', 0, 0, 30, 1),
(10005, 10000, 'cpu_num|CPU Cores', '1', 0, 0, 31, 0),
(10006, 10000, 'bandwidth|Monthly Bandwidth', '1', 0, 0, 40, 0),
(10007, 10000, 'port_speed|Port Speed', '1', 0, 0, 41, 0),
(10008, 10000, 'allow_rebuild|Allow Reinstall', '1', 0, 0, 50, 1);

INSERT INTO `tblproductconfigoptionssub` (`id`, `configid`, `optionname`, `sortorder`, `hidden`) VALUES
(1, 10000, '10240|10 GB', 0, 0),
(2, 10000, '25600|50 GB', 0, 0),
(3, 10000, '102400|100 GB', 0, 0),
(4, 10001, '10|10 Mbps', 0, 0),
(5, 10002, '300|300 IOPS', 0, 0),
(6, 10003, '1024|1 GB', 0, 0),
(7, 10003, '2048|2 GB', 0, 0),
(8, 10004, '10000|100%', 0, 0),
(9, 10005, '1|1 Core', 0, 0),
(10, 10005, '2|2 Cores', 0, 0),
(11, 10006, '1000|1 TB', 0, 0),
(12, 10006, '2000|2 TB', 0, 0),
(13, 10007, '102400|100 Mbps', 0, 0),
(14, 10007, '204800|200 Mbps', 0, 0),
(15, 10008, 'Yes', 0, 0),
(16, 10008, 'No', 0, 0);



Next: Modules/Addons » HostBill Module
Previous: Modules/Addons

Testimonials