TCAdmin2 advanced module for WHMCS

This software comes “as is” and no support for the module will be provided by TCAdmin. TCAdmin support is limited to the TCAdmin software.

Requirements

  1. You must have a fully installed, licensed and configured TCAdmin control panel. This includes game files, automation setup and email templates.
  2. Fully installed and configured WHMCS installation.
  3. PHP curl extension enabled.

WHMCS module features

  1. Supports the following WHMCS module commands:
    1. Create: Create game and voice servers automatically. Game switching is supported.
    2. Suspend/Unsuspend/Terminate: Automatically suspend/enable/delete game and voice servers.
    3. Change Package: Update a game/voice server’s private status, branding and slots.
    4. Change Password: Change the client’s TCAdmin password from within WHMCS.
  2. Direct client login from WHMCS to TCAdmin.
  3. Configurable options and custom fields can be used to set all the TCAdmin billing API attributes. This makes it flexible. You configure your packages exactly the way you want them. For example: Configure your packages to ask your clients for their game server’s location, hostname and passwords in the WHMCS order page.

TCAdmin billing API configuration settings

Configure TCAdmin according to the Billing API configuration page.

TCAdmin Teamspeak Configuration

WHMCS Module Installation and Configuration

Installing the Files

  • Extract the contents of the tcadmin_advanced.zip file to the path /whmcs/modules/servers in your WHMCS installation.

Adding the TCAdmin Server

  1. Log in to WHMCS.
  2. Go to Configuration > Servers and Click on Add New Server.
  3. Enter the server name, hostname, ip address, port, select server type "tcadmin_advanced" and enter the admin login and password that will be used. If you don’t use a hostname to access your control panel (cp.yourdomain.com:8880) enter your website’s ip address (xxx.xxx.xxx.xxx:8880) in the hostname field.

You have just installed and configured the TCAdmin module into WHMCS!

Creating Products in WHMCS

Creating packages within WHMCS is the same as we are all used to. But now we have our TCAdmin attributes which we can configure for the automation process. TCAdmin variables can be used in a couple of different ways. These attributes can be set using "Custom Fields" or "Configurable Options" within the product page.

Module settings

The most common attributes can be configured in the module settings tab. Other attributes can be configured in the file specified in the "Config File" field. The default config file is "default_values.php". You can use a config file that has different values depending on the configuration that is required for each product. Assign a "Custom Field" or "Configuration Option" from the list next to each attribute. When the module command is executed the tcadmin attribute will take the value of that field or option.

Config File (default_values.php)

To configure attributes that are not on the Module settings edit file default_values.php located in \whmcs\modules\servers\tcadmin_advanced. You can configure them to take the value of a "Custom Field", "Configuration Option" or a fixed value.

  • To configure it to use a “Custom Field” set the value to "CustomField:FieldName" for example "CustomField:Hostname"
  • To configure it to use a "Configuration Option" set the value to "ConfigOption:OptionName " for example " ConfigOption:Slots"

Example:

$billing_api_values["game_additional_slots"] = "ConfigOption:Extra Slots";
$billing_api_values["game_additional_arguments"] = "ConfigOption:Tickrate";
$billing_api_values["game_level"] = "ConfigOption:Premium Server";

Custom Config File

In some cases you might need to set different API values for a specific game. To use different config files for a game you can create a new text file in the tcadmin_advanced folder with these lines:

<?php
 include('default_values.php');
 $billing_api_values["game_slots"] = 100;
?>

This example sets the game slots to a fixed value of 100. All the other values configured in default_values.php are left the same. In the product's service settings configure this file as the config file instead of default_values.php.

Specifying Different Module Value and Display Value

In WHMCS, you can configure dropdowns and radios to send a different value to the module than the one that is displayed in the order form. This is useful because you must send ids to the TCAdmin billing api but you want to show a friendly name to the client. The module value and display value are separated by the pipe character "|". The format is ModuleValue|DisplayValue For example: You can create a dropdown list that has the locations New York and Dallas but you want the billing api to receive the datacenter ids TC0633808447606 and TC0608063387644. You can create a "Custom Field" of type "Drop Down" with these options: TC0633808447606|Dallas,TC0608063387644|NewYork

Retrieved from "https://help.tcadmin.com/index.php?title=TCAdmin2_advanced_module_for_WHMCS&oldid=167"