{"id":3671,"date":"2020-05-06T13:18:12","date_gmt":"2020-05-06T13:18:12","guid":{"rendered":"http:\/\/www.softaculous.com\/blog\/?post_type=docs&#038;p=3671"},"modified":"2024-10-23T09:25:55","modified_gmt":"2024-10-23T09:25:55","slug":"whmcs-licensing-addon","status":"publish","type":"docs","link":"https:\/\/www.softaculous.com\/blog\/docs\/developers\/whmcs\/whmcs-licensing-addon\/","title":{"rendered":"WHMCS Licensing Addon"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Overview<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Do you want to Resell Softaculous licenses from WHMCS&nbsp;?&nbsp;<br>This guide will help you to setup WHMCS licensing addon to resell Softaculous Licenses. Setting this up is very easy.<\/p>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\">Note : This module supports reselling Softaculous licenses as an addon along with VPS\/Dedicated server product.<br>If you are looking to resell standalone Softaculous licenses as a separate product refer to the <a href=\"https:\/\/www.softaculous.com\/docs\/developers\/whmcs-licensing-module\/\">following guide<\/a>.<\/p>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\"><strong>Note&nbsp;:<\/strong> You will need Softaculous NOC account to use this hook, because the API can be used only by NOCs. You can register as a NOC partner&nbsp;<a href=\"http:\/\/www.softaculous.com\/clients?ca=noc\">here<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Download and Upload<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For WHMCS 7.2+<\/strong>\u00a0<br>Download the Module here\u00a0<a href=\"https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2024\/10\/whmcs_license_addon.zip\">File:SoftlicenseAddon.zip<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unzip it and upload the files&nbsp;<strong>softaculous.php<\/strong>&nbsp;and&nbsp;<strong>noc_api.inc<\/strong>&nbsp;to the following path<\/p>\n\n\n\n<pre class=\"wp-block-preformatted bash hljs\">\/path\/to\/whmcs\/modules\/servers\/softaculous\/<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"> Configuring Product Addon <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Go to WHMCS admin panel -&gt; Setup -&gt; Products\/Services -&gt; Product Addons and click on the <strong>Add New Addon<\/strong> button.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Fill in Addon details like Name, Description, Pricing, etc<\/li>\n\n\n\n<li> Under <strong>Applicable Products<\/strong> choose the product under which this addon option should be available for users to choose <\/li>\n\n\n\n<li>Under <strong>Module Settings<\/strong> tab fill in the following details<br>Product Type : Other<br>Module Name : Softaculous<br>Softaculous Username : USERNAME of your NOC account<br>Softaculous Password : Password of your NOC account<br>Server Type : VPS\/Dedicated choose which type of Softaculous license should be issued<br>Also choose when the addon setup should be done i.e. after payment is received or after manually approving the order.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"416\" src=\"http:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-001.png\" alt=\"\" class=\"wp-image-3666\" srcset=\"https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-001.png 1000w, https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-001-300x125.png 300w, https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-001-768x319.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Product Addon &#8211; Module Settings<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Editing Variables<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This module allows you to customize some variables in&nbsp;<strong>softaculous_mod_extra.php<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Billing Period<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted php hljs\">$GLOBALS['softaculous_mod_conf']['billing_period'] = '';<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">By default the billing cycle is detected for the WHMCS order being created and the same is used for the Softaculous license period. If the detection fails the default value is&nbsp;<strong>1M<\/strong>&nbsp;i.e. Monthly. However if you would like to overwrite the billing cycle you can define the above variable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This variable allows you to choose the period to extend for Softaculous license when the WHMCS product service is CREATED and RENEWED. Default is 1M i.e. 1 month if you do not specify this variable. You can set the period to extend as per your desire&nbsp;<br>Possible values&nbsp;:&nbsp;<br>1M = 1 month&nbsp;<br>3M = 3 months&nbsp;<br>6M = 6 months&nbsp;<br>1Y = 1 year&nbsp;<br>2Y = 2 years&nbsp;<br>3Y = 3 years <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Cancel Softaculous license when service is suspended<\/h4>\n\n\n\n<pre class=\"wp-block-preformatted php hljs\">$GLOBALS['softaculous_mod_conf']['cancel_on_suspension'] = '';<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">By default the Softaculous license is not cancelled when a WHMCS service is suspended. However if you would like cancel the Softaculous license when WHMCS service is suspended you can set the above variable as <strong>1<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Testing the Setup<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Place an Order<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">You can test the setup by making a DUMMY Order and going to the Manage Orders page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"304\" src=\"http:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-005.png\" alt=\"\" class=\"wp-image-3683\" srcset=\"https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-005.png 1000w, https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-005-300x91.png 300w, https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-005-768x233.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><figcaption class=\"wp-element-caption\">Manage Order<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Run Module Create<\/h4>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"891\" height=\"341\" src=\"http:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-006.png\" alt=\"\" class=\"wp-image-3684\" srcset=\"https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-006.png 891w, https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-006-300x115.png 300w, https:\/\/www.softaculous.com\/blog\/wp-content\/uploads\/2020\/05\/whmcs-licensing-module-006-768x294.png 768w\" sizes=\"auto, (max-width: 891px) 100vw, 891px\" \/><figcaption class=\"wp-element-caption\">Module Create<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click on the&nbsp;<strong>Create<\/strong>&nbsp;button to run the create module function for the addon.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s it ! <br>You will get a success message if the module is created successfully. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can login to <a href=\"https:\/\/www.softaculous.com\/clients\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Softaculous Client Center (opens in a new tab)\">Softaculous Client Center<\/a> and verify that the license was issued with the correct details. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly you can test the Suspend, Unsuspend, Terminate, View License commands.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In case of Suspend the Auto Renewals of the license will be cancelled (if any).<\/li>\n\n\n\n<li>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.<\/li>\n\n\n\n<li>In case of View License you will be redirected to Softaculous Client Center.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Support<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you need any assistance then please contact <a href=\"https:\/\/softaculous.deskuss.com\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Softaculous Support (opens in a new tab)\">Softaculous Support<\/a>. <\/p>\n","protected":false},"featured_media":0,"parent":1690,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","docs_category":[],"class_list":["post-3671","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/3671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/comments?post=3671"}],"version-history":[{"count":13,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/3671\/revisions"}],"predecessor-version":[{"id":5946,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/3671\/revisions\/5946"}],"up":[{"embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs\/1690"}],"wp:attachment":[{"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/media?parent=3671"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/www.softaculous.com\/blog\/wp-json\/wp\/v2\/docs_category?post=3671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}