|
1 | 1 | # CubeCoders AMP WHMCS Module |
2 | 2 |
|
3 | 3 | This WHMCS module provides provisioning integration with CubeCoders AMP with WHMCS. |
| 4 | + |
| 5 | +<h2>Installing the AMP WHMCS module</h2> |
| 6 | + |
| 7 | +1. Download the .Zip file from this GitHub |
| 8 | +2. Upload the package content into your MAIN WHMCS DIRECTORY.
(We recommend using an FTP Client) |
| 9 | +3. Login to WHMCS Admin Area |
| 10 | +4. Navigate to **System Settings -> Product & Services -> Servers** |
| 11 | +5. Click on **Add New Server** |
| 12 | + |
| 13 | +- For the Module type, select **AMP** |
| 14 | +- Enter the hostname for your AMP server followed by a Username and Password |
| 15 | + |
| 16 | +- Note: You should create a seperate AMP user for WHMCS with the Super Admin Role and ensure MFA is disabled for this user. |
| 17 | + |
| 18 | +6. Click **Test Connection** |
| 19 | + |
| 20 | +- If the connection was successful you will see a green banner confirming the connection at the top |
| 21 | + |
| 22 | +- Enter a Name for this AMP server that will be displayed in WHMCS |
| 23 | + |
| 24 | +7. Click **Save Changes** |
| 25 | +8. From the Servers overview page click on **Create New Group** |
| 26 | + |
| 27 | +- Enter a Name for your AMP Server Group |
| 28 | +- Select your AMP Server(s) from the list and Add to Selected Servers |
| 29 | + |
| 30 | +9. Click **Save Changes** |
| 31 | + |
| 32 | +<h2>Creating the AMP Welcome & Password Reset Email Template</h2> |
| 33 | + |
| 34 | +10. Navigate to **System Settings -> System -> Email Templates** |
| 35 | +11. Click on **Create New Email Template** |
| 36 | + |
| 37 | +- For Email Type, click the dropdown and select **Product/Service** |
| 38 | +- Enter the name “AMP Welcome Email” for this template. |
| 39 | + |
| 40 | + ⚠️ Its important you use this exact template title name otherwise the email will not be sent once AMP has provisioned the Instance. This name will not be visible to your customers |
| 41 | + |
| 42 | +- Enter an Email Subject that your customers will see such as “Important Account Information” |
| 43 | +- Copy and paste the below template into the text area of the email template |
| 44 | + |
| 45 | + Congratulations {$client_name}, |
| 46 | + |
| 47 | + Your order has now been activated and you are minuets away from starting an epic journey with your friends in {$service_product_name} |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + Username: {$service_username} |
| 52 | + |
| 53 | + Generated Password: {$service_password} |
| 54 | + |
| 55 | + Console Login: https://{$service_server_hostname}/?instance={$service_instance_id} |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + Lets get started! |
| 60 | + |
| 61 | + Now that you are a {$service_product_name} Server owner, you'll need to login to the above link and accept the {$service_product_name} EULA and then Start your server. |
| 62 | + |
| 63 | + Please raise a ticket on our website if you require assistance. |
| 64 | + |
| 65 | + |
| 66 | + {$signature} |
| 67 | + |
| 68 | +12. Click **Save Changes** |
| 69 | +13. Next, we'll setup the AMP Password Reset email. |
| 70 | +14. Navigate to **System Settings -> System -> Email Templates** |
| 71 | +15. Click on **Create New Email Template** |
| 72 | + |
| 73 | +- For Email Type, click the dropdown and select **Product/Service** |
| 74 | +- Enter the name “AMP Password Reset” for this template. |
| 75 | + |
| 76 | +⚠️ Its important you use this exact template title name otherwise the email will not be sent once AMP has provisioned the Instance. This name will not be visible to your customers |
| 77 | + |
| 78 | +- Enter an Email Subject that your customers will see such as “Password Reset Information” |
| 79 | +- Copy and paste the below template into the text area of the email template |
| 80 | + |
| 81 | + Hello {$client_name}, |
| 82 | + |
| 83 | + We've reset your password to your Control Panel. Please find your new login details below: |
| 84 | + |
| 85 | + |
| 86 | + Username: {$service_username} |
| 87 | + |
| 88 | + Generated Password: {$service_password} |
| 89 | + |
| 90 | + Console Login: https://{$service_server_hostname}/?instance={$service_instance_id} |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + If you did not request this password change, please reply to this email. |
| 95 | + |
| 96 | + {$signature} |
| 97 | + |
| 98 | +16: Click **Save Changes** |
| 99 | + |
| 100 | +<h2>Set the callback function between AMP & WHMCS</h2> |
| 101 | + |
| 102 | +17. Login to your AMP Control Panel |
| 103 | +18. Navigate to **Configuration -> Instance Deployment** |
| 104 | +19. Set the Template deployment callback URL as follows : |
| 105 | + |
| 106 | + https://WHMCS_URL/index.php?ampCallback=1 |
| 107 | + eg. https://example.com/index.php?ampCallback=1 |
| 108 | + |
| 109 | +⚠️ Ensure to change WHMCS_URL to your own domain where WHMCS is installed as this will allow AMP to tell WHMCS once the product is created and the status of the instance. |
| 110 | + |
| 111 | + |
| 112 | +<h2>Setting up a Server Group & Product within WHMCS</h2> |
| 113 | + |
| 114 | +20. Navigate to **System Settings -> Products & Services -> Products/Services** |
| 115 | +21. Create New Product Group ( or use existing one ) |
| 116 | + |
| 117 | +- Select **Create New Product** |
| 118 | +- For the Product Type, select **[Other]** |
| 119 | +- From the Product Group dropdown, select the Product Group you created earlier |
| 120 | +- Enter a product name (For Example, Minecraft Java) |
| 121 | +- Click on the drop down menu for Module and select **AMP** |
| 122 | + |
| 123 | +22. Click on **Continue** |
| 124 | + |
| 125 | +- Click on the **Module Settings** tab |
| 126 | +- Ensure that Module Name is set to **AMP** |
| 127 | +- Click on the Server Group drop down menu and select the Server Group you created earlier |
| 128 | + |
| 129 | +- You will now see new fields appear that are specific to this product |
| 130 | +- The **Provisioning Template** allows you to select your deployment template within AMP for specific server you want to deploy |
| 131 | +- Then select the **Post Create Action** from the below list depending on your desired outcome |
| 132 | + |
| 133 | + Do Nothing = Creates instance and doesnt start the instance or application |
| 134 | + Start Instance = Creates and starts the instance but doesnt start the application automatcially |
| 135 | + Start instance & update application = Creates & Starts the instance and performs an application update. |
| 136 | + Full Instance & application startup = Creates & Starts the instance and starts & updates the application and starts the application everytime the instance starts. (Providing no additional setup is required on the customers behalf such as EULA acknowledgement or Steam sign in) |
| 137 | + |
| 138 | +- Set the **Required Tags** field as per below |
| 139 | +- If you are running AMP in **Standalone** or Hybrid mode, enter the value ‘Local’ |
| 140 | +- If you are running AMP in **Controller/Target** mode, enter the Tag value that you have set on a Target within the AMP panel |
| 141 | +- Extra Provision Setting field allows you to set a static setting that will apply to all Instances created for this product. If you wish to sell customisable parameters such as RAM & CPU allocations, please see the Configurable Options section further down. |
| 142 | +- The **Update Every Tim**e option tells AMP if the application should be updated everytime the instance is started in teh future |
| 143 | +- The **Mode** selection allows you to specify how teh Endpoints are displayed in the Client section of WHMCS. For example: |
| 144 | + |
| 145 | + Standalone URL will be displayed as https://yourdomain.com:25565 |
| 146 | + Target/Node IP Address will be displayed as 0.0.0.0:25565 |
| 147 | + |
| 148 | +- Now select your preference for the Automatic Setup |
| 149 | + |
| 150 | +23. Click **Save Changes** |
| 151 | + |
| 152 | +⚠️ Don’t forget to set the other configurations in the other tabs for this product such as pricing. |
| 153 | + |
| 154 | +You’re ready to go! Module is ready to use. After activation of ordered product, module will wait for callback - then Application URL will be show in client area. |
| 155 | + |
| 156 | +<h2>Configurable Options</h2> |
| 157 | + |
| 158 | +You can set custom configuration options within WHMCS for settings such as RAM Allocation & CPU Allocation. |
| 159 | + |
| 160 | +1. Navigate to **System Settings -> Products & Services -> Configurable Options** |
| 161 | +2. Click on **Create a New Group** and give it a name such as ‘AMP Product Options’ |
| 162 | +3. From the Assigned Products select the products that these configurable options applies to |
| 163 | +4. Click on **Add New Configurable Option** |
| 164 | +5. Enter the configrable option that you would like to set from the list below and click **Save Changes** |
| 165 | + |
| 166 | + <h3> Example Configurable Options</h3> |
| 167 | + |
| 168 | + +$$ContainerCPUs|Server CPU Allocation |
| 169 | + 2|2 CPU Cores |
| 170 | + 4|4 CPU Cores |
| 171 | + +$$ContainerMemoryMB|RAM Allowance |
| 172 | + 1024|1 GB |
| 173 | + 2048|2 GB |
| 174 | + 4096|4 GB |
| 175 | + |
| 176 | +<h2>FAQ’s</h2> |
| 177 | + |
| 178 | +Q: Do I need to set a Product Welcome Email in each product? |
| 179 | + |
| 180 | +A: No, the AMP WHMCS Module will always send out the email Template called “AMP Welcome Email”. You can however send an additional welcome email by selecting another email template in the Welcome Email drop down box within each product. |
0 commit comments