WHMCS Licensing Module

From Softaculous Wiki
Jump to: navigation, search


Overview

Do you want to Resell Softaculous licenses from WHMCS ?
This guide will help you to setup WHMCS licensing module to resell Softaculous Licenses. Setting this up is very easy.

Download and Upload

Download the Module :
For PHP version 5.6.x and 7.x File:Softlicense.zip
For PHP version 5.3.x, 5.4.x and 5.5.x File:Softlicense php53.zip

If you are using WHMCS 5.x or lower please use the following file File:Softlicense whmcs5.zip

Unzip it and upload the files softaculous.php and noc_api.inc to the following path

/path/to/whmcs/modules/servers/softaculous/

Adding Configurable Option

NOTE : If want to setup two separate products (i.e. VPS and Dedicated) and don't want to ask your users to choose the server type. You can skip this step.

  • We need this option to ask the user if they want VPS or Dedicated server license.
  • 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 => Server Type
    • Option 1 => Dedicated
    • Option 2 => VPS

NOTE : The above values should be the same i.e. Server Type, Dedicated and VPS. If the values are not as per this guide the module might not work properly. You can set the pricing as you wish. ConfigOptions.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 setting up the Module.

Setup Module

This option can be found while editing the Product/Service in Module Settings Tab.

  • Select the Module Name as Softaculous.
  • 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.

  • Server Type : This option allows you to choose if you want users to choose the server type (i.e. Dedicated or VPS) or you want to configure two separate products and choose server type as per the product.
    • Use Configurable Options : Choose this option if you want your users to select the server type. Make sure you can configured the Configurable options in the previous step.
    • Dedicated : Choose this option if you want the product to issue a Softaculous Dedicated Server license.
    • VPS : Choose this option if you want the product to issue a Softaculous VPS license.
  • Now choose the option when you want the module to be executed. Just remember that Softaculous license will be issued as per the method you select to execute the module.

When to Create license.jpg

Once you are done hit the Save Changes button and thats it you are done.

Testing the Setup

You can test the setup by making a DUMMY Order and going to the settings of that order.

Edit Order license.jpg


Creating Account

Make sure the Server Type i.e. VPS/Dedicated and License IP are setup as desired.

Edit Screen license.jpg

Then click on the Create button to create the account on the server.
You will see a Box shown in the following image

Create Account License.jpg


Success Message

When the page reloads the following message will be shown in case of success :

Debug Successful license.jpg

Error Message

Incase of Failure errors will be shown :

Debug Failure license.jpg

Similarly you can test the Suspend, Unsuspend, Terminate, View License commands.

  • In case of Suspend the Auto Renewals of the license will be cancelled (if any).
  • In case of Terminate the license will be cancelled and if the license was issued less than 7 days ago the transaction will be refunded.
  • In case of View License you will be redirected to Softaculous Client Center.

Edit IP

  • Users can also Edit the IP from the Product details page.
  • Enter the New IP and click on Change IP button.
  • The IP will be changed in the Softaculous records.

Edit IP.jpg

Support

If you need any assistance then please contact Softaculous Support. Please send us a screenshot of the Order Form and the Custom Fields you added to the Product.

Vote

If you find this addon useful please vote for us :
https://www.whmcs.com/members/communityaddons.php?action=viewmod&id=1042