WHMCS Licensing Hook

From Softaculous Wiki
Jump to: navigation, search


Overview

Do you want to offer Softaculous as an addon to your VPS/Dedicated server clients ? We have a WHMCS hook for that.
This guide will help you to setup WHMCS hook to license Softaculous with your existing Modules. Setting this up is very easy.

Download and Upload

Download the Hook here File:SoftLicenseHook.zip.
Unzip it and upload the files softaculous_license.php, softaculous_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 Softaculous license with their VPS/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 => Auto Installer If you would like to use some other name please edit the value for $GLOBALS['softaculous_conf']['fields']['Auto Installer'] in softaculous_license_conf.php
    • Option 1 => Softaculous Auto Installer
    • Option 2 => None

NOTE : The above values should be the same. Set the pricing as you wish. ConfigOptionsHook.jpg

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 softaculous_license_conf.php

1. (Required) Edit the Softaculous NOC account login details

$conf_softaculous['noc_username'] = 'example'; //Softaculous NOC username
$conf_softaculous['noc_password'] = 'example'; //Softaculous NOC user password

Enter the Softaculous NOC account details i.e. Softaculous Username and Softaculous 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 and the ones which are VPS.

$conf_softaculous['vps_pid'] = array();
$conf_softaculous['dedicated_pid'] = array();

This is to determine if you will need Softaculous VPS license or a Dedicated server license.

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_softaculous['product_id'] = array();

4. (Optional) If you would like to debug set the debug mode to 1 :

$conf_softaculous['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 Softaculous Support.

Vote

If you find this addon useful please vote for us :
http://www.whmcs.com/appstore/3542/Softaculous-Licensing-Hook.html