CloudFlare Reseller WHMCS Module

From WHMCS Global Services Module Documentation
Jump to: navigation, search

Getting Started

WGS Cloudflare Reseller WHMCS Module is an amazing module that allows your customers to add websites to Cloudflare and to manage them from WHMCS. Additionally, Your customers can also manage websites from WHMCS which are already added to Cloudflare.


How to Upgrade from 4.1.5 to 5.0.0?

Note: As you know, Cloudflare has deprecated its hosting account. So, we have released this module for it. It will support the Cloudflare reseller API account only so customers who are using the Hosting partner API there is no need to upgrade the module to latest 5.0.0, you can continue using the 4.1.5 version. This module is for new Cloudflare customers who want to become a CF reseller.


Prerequisites

  • WHMCS 7.9
  • Ioncube Loader 10 or later
  • WHMCS DB User must have all permissions of the DB before installation and activation of this Module GRANT ALL PRIVILEGES ON db_base.* TO db_user @'localhost' IDENTIFIED BY 'db_passwd';
  • Cloudflare Reseller Account

How to get API key?

  1. Login to your Cloudflare account https://dash.cloudflare.com/.
  2. Go to "My Profile".
  3. Go to "API Token".
  4. Scroll down to "API Keys".
  5. Click on the "View" button to see your API identifier (Global API Key).

How to download the module files?

Login with our WGS dashboard "https://whmcsglobalservices.com/members/clientarea.php" using your account detail. After login, go to "ACTIVE SERVICES" section, click on your cloudflare product service and then click on "Downloads" tab. Found your specific PHP version file and download it.

How to upload the module files?

  1. Extract the downloaded module folder.
  2. Under Modules folder, you will find two folders i.e. crons, addons and servers.
  3. Under Modules folder, you will find the crons folder and inside this crons folder, cf_add_domain_cron.php file can be found. You need to upload that file to WHMCS crons directory (whmcs_root/crons/). If you have customized your crons folder to non-public directory then need to upload this files on that crons directory.
  4. Under Modules folder, you will find the addons folder and inside this addons folder, clodflare_reseller module folder can be found. You need to upload that module folder to WHMCS addons directory (whmcs_root/modules/addons/).
  5. Under Modules folder, you will find the servers folder and inside this servers folder, wgs_cloudflare_reseller module folder can be found. You need to upload that module folder to WHMCS server’s directory (whmcs_root/modules/servers/).

Server (Provisioning) Module Installation/Configuration

Go to Setup >>>> Products/Services >>>> Products/Services

alt text

1. Create new product group and create products for cloudflare with this created group.

alt text

2. From "Module Settings" tab select "Module Name" from Drop Down as Wgs Cloudflare Reseller

3. After configuring the module correctly click on the "Save Changes" button to save the changes.


alt text

How to allow your customers to upgrade CF (Cloud Flare) plan in Client Area?

1. You need to create a new product for this. Configure this upgrade product as same as the existing configured CF product.

2. Edit existing created Cloudflare products and then go to the "Upgrades" tab. Select specific products from "Packages Upgrades" and then save the setting.

alt text

How to upgrade the domains limit using configurable options?

With our WGS CF Reseller module, you can offer your clients to buy more domains with products using product configurable options.

When you will configure the CF module with any product then the module will auto-create the configurable group and configurable option with WHMCS. During the order, your customers can select the limit of domains and you can charge them for extra domains. If you want to give an option to your customers to buy additional domains with existing products services using the "Upgrading/Downgrading of configurable options" feature. Follow the given steps to enable this option.


1. Edit existing created Cloudflare products and then go to the "Upgrades" tab. Enable this option "Configurable Options" and then save the setting.

alt text

How to sell product addon instead of product?

When you will configure the module with any product then module will create the required product addons with WHMCS. You have to assign the hosting products with these product addons.

alt text

Enable "Show on Order" option with this specific product addon.

alt text

Assign the specific hosting products (which products you want to add this addon) and save the changes.

alt text

Cloudflare Reseller Addon Module Installation/Configuration

We are providing an addon module with our CF module for CF plans and features mapping. Follow given below steps to install/configure addon module.

1 Go to "Setup" >>> "Addon Modules".

2 Find module name as Cloudflare Reseller Module

3 Activate and Configure (Assign the role groups to access this module) this addon module.

alt text


Cloudflare Module Setting

  • After installation/configuration the addon module. Go to the "Addons" tab and click on Cloudflare Reseller Module addon module.
  • Click on the "Settings" tab under the addon module menu bar.
  • Enter your Module License Key, API URL https://api.cloudflare.com/client/v4/, API Key and Email (Your CF registered email).
  • Submit the settings.
alt text


Product Settings

On this page, the module will only display those products which have assigned our "WGS Cloudflare Reseller" module. Here you can configure/setup your products as per your requirements.

User Account Type: From this dropdown, you can choose the type of new CF user "Enterprise/Standard".

Create Member: Enable this option to create a membership with your CF account. If you have enabled it then the module will create the membership (as administrator role) with your account and Members will be invited to join your account.

Administrator - Can access the full account, except for membership management and billing.

Plan:Assign the specific CF plan with WHMCS product.

Zone Type: Select zone type as (Full zone setup "DNS" or Partial zone setup "CNAME") for new CF domain/zone.

DNS IP: Enter your hosting server IP for adding A and @ DNS records when domain will be adding on your CF. If you do not want to add it then leave it blank.

No. Of Domains: Enter limit of domains, how many numbers of domains you want to offers to your users with the appreciable product.

Proxy: Enable this option to enable HTTP Proxy by default with new adding DNS records with the zone.

Status: Disable this option to stop provisioning with the appreciable product.

Features: Here you can see the total numbers of enabled features.

Click on the "Save" icon to save the setting for specific product/Row.

alt text

Manage Product Features

Click on the edit icon under action from the product list under "Product Settings" to manage the features. On this page, you can enable/disable the client area features or tabs for an appreciable product.

alt text

How to configure/setup the cron for auto domain add on CF (in case of domain not register)?

Some times, if the domain is not registered or taking some time to register globally then CF will return the error like "Domain not registered yet". That time module will store this domain in DB. We are providing a file which you have to configure with your server on a time interval of 5 minutes.

This file will add the domain on CF when the domain is registered.

Cron Command: -q /home/yourfolder/public_html/crons/cf_add_domain_cron.php

Note. You can find your exactly crons folder path from your WHMCS automation settings. To find this setting, login as WHMCS admin, then go to "Setup" >>> "Automation Settings".

How to sell only DNS service?

With our module, you can sell only DNS service using CF. Follow the given below steps.

  • Create a new product with WHMCS and assign the "WGS Cloudflare Reseller" module with it.
  • Go to "Cloudflare Reseller" addon module >> Product Settings.
  • Configure this created new product and Save the settings on click on Save icon button.
  • After saving the settings click on the Edit icon button and then enable only Overview and DNS options with this appreciable product.