Difference between revisions of "WHMCS Billing Module for XtreamUI"

 
(54 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
  
This module allows Users to be auto-provisioned instantly on payment for XtreamUI. Automates the adding of credits for Reseller's and Users.  
+
This WHMCS module allows Users to be auto-provisioned instantly for Xtream-UI. It Automates the adding of credits for Reseller's and Users.
  
 
== Requirements ==
 
== Requirements ==
Line 7: Line 7:
  
 
Requirement Minimum Recommended PHP Version 7.2 Latest 7.3 or 7.4 Release PHP Memory Limit 64MB 128MB**
 
Requirement Minimum Recommended PHP Version 7.2 Latest 7.3 or 7.4 Release PHP Memory Limit 64MB 128MB**
 +
 +
If you are using shared hosting your provider may be blocking outbound ports. Most Shared hosting providers do this. Contact your hosting provider and get them to open the port that your reseller panel is on. i.e XtreamUI default port is 25500 unless this has changed get them to open the port. Most providers will open the port.
 +
We have our own CPanel servers that will work out of the box. [https://xtreamresell.com/index.php?rp=/store/cpanel-shared-hosting click here for pricing]
  
 
== Installation and Configuration ==
 
== Installation and Configuration ==
Line 26: Line 29:
  
 
3. Extract the package and upload its contents
 
3. Extract the package and upload its contents
'''addonxuiresell''' will be uploaded to whmcs/modules/addons
+
'''addoonxtreamresell''' will be uploaded to whmcs/modules/addons
'''xuiresell''' will be uploaded to whmcs/modules/servers
+
'''xtreamresell''' will be uploaded to whmcs/modules/servers
  
 
The content of the package to upload should look like this.
 
The content of the package to upload should look like this.
  
[[File:step2.jpg|800px]]
+
[[File:xtreamui2.png|800px]]
 +
 
 +
[[File:xtreamui3.png|800px]]
 +
 
 +
=== How to License ===
 +
 
 +
4. Log in to our client area and get your license key.
 +
 
 +
[[File:Xtreamui4.png|600px]]
 +
 
 +
5. In Whmcs go to "System Settings" > "Addon Modules".
 +
 
 +
[[File:Xtreamui6.png]]
 +
 
 +
6. Click Activate.
 +
 
 +
7. Click Configure. Paste your License Key in, Check the box "Full Administrator" and click Save.
 +
 
 +
[[File:Xtreamui5.png|800px]]
 +
 
 +
=== How to Configure ===
 +
 
 +
8. Enable "Attempt to load all files" in "Encoded File Loading" by doing this. Click "System Settings" > "General Setting" > "Other" and check the box "Attempt to load all files".
 +
 
 +
[[File:Xtreamui16.png|800px]]
 +
 
 +
9. In order to create and configure a product, go to 'System Settings' → 'Products/Services'.
 +
 
 +
10. Click "Create New Group" and click save.
 +
 
 +
11. Click "Create a New Product".
 +
 
 +
[[File:Xtreamui7.png|800px]]
 +
 
 +
12. Fill in the above information. Make sure you select "XtreamResell" as the module. Click Continue.
 +
 
 +
[[File:Step8.jpg|800px]]
 +
 
 +
13. Fill in product Description. You can leave Welcome email as the default. We will setup a Email template later and you can come back and change the Welcome Email. Click continue.
 +
 
 +
[[File:Step9.jpg|800px]]
 +
 
 +
14. If the product is for a free trial you would use the above settings. "Auto Terminate/Fixed Term" is the number of days to auto terminate the product. If its a 24 hour trial you would set that to 1 and 2 for 48 hours. Leave that as 0 for Paid Subscriptions.
 +
 
 +
[[File:step10.jpg|800px]]
 +
 
 +
15. For Paid subscriptions you would use something similar to the above. Select "Recurring". The customer would then receive Recurring invoices on a Monthly, Quarterly etc, etc period. Set your pricing. Make sure "Auto Terminate/Fixed Term" is set to 0. Click save changes.
 +
 
 +
 
 +
16. Fill in the below information. make sure you add a / of the end of your url's. If you are setting up a trial and wish to select all trial products from the panel select "trial_username". Click save. Your Trial products will now show in the drop down boxes
 +
 
 +
[[File:Xtreamui8.png|800px]]
 +
 
 +
17. Note for "trial_username" I have selected the contents of the "Trial_ID" drop down box. If its a trial you must select that drop down box.
 +
 
 +
[[File:step15.jpg|800px]]
 +
 
 +
19. If you don't want the user to choose their own username or password you can check these boxes. This will generate a "Numeric" username and password. We did this because people find it easier to read numbers then complex randomly generated alpha, numeric ones.
 +
 
 +
[[File:step14.jpg|800px]]
 +
 
 +
20. Because this is a free trial we select "Automatically setup the product as soon as an order is placed" and click save.
 +
 
 +
[[File:Xtreamui9.png|800px]]
 +
 
 +
21. For Paid Subscriptions. We select "official_username" for "Line Type". We then select products from the drop down boxes. NOTE: in the previous tab where you added your prices they should match. i.e If you only set Monthly pricing then you will only setup Monthly here.
 +
 
 +
[[File:step17.jpg|800px]]
 +
 
 +
21. Because this is a paid subscription we set "Automatically setup the product as soon as the first payment is received". So once whmcs receives payment it will automatically setup the user.
 +
 
 +
[[File:step18.jpg|800px]]
 +
 
 +
22. In the next tab "Custom Fields". in the field "Field Name" enter "Username" NOTE: Its starts with a capital U. If the line is for a mac you would enter "MAC" here. NOTE: All in capitals.(if you are setting up a mac in the previous step you would select "official_mac or trial_mac from the "line Type" drop down box.
 +
If you want the user to choose their own username you would check all three boxes. "Required Field" "Show on Order Form" "Show on Invoice".
 +
If you selected "Random Username" in the previous section you will only check. "Required Field" "Show on Invoice"
 +
If you want to use the password generated by XUI make sure in the previous section you have not checked "Random Username" and select "Required Field" "Show on Invoice" here.
 +
 
 +
23. Click "save" your product has now been setup.
 +
 
 +
=== Working with captchas ===
 +
 
 +
ProjectX for XtreamUI has the ability to solve Captchas should your panel be protected by one. Please complete the following.
 +
 
 +
24. Register with 2captcha here and add credits. Prices are very reasonable. Starting from 0.5 USD for 1000
 +
solved CAPTCHAs
 +
 
 +
https://2captcha.com?from=7465674
 +
 
 +
[[File:Xtreamui10.png|800px]]
 +
 
 +
25. Once Signed up go to your dashboard and copy your "API Key" and enable "100 recognition".
 +
 
 +
[[File:Xtreamui11.png|800px]]
 +
 
 +
26. Go to your panel login screen and "right click" anywhere on the page and click "Page Source".
 +
 
 +
[[File:Xtreamui12.png|800px]]
 +
 
 +
27. look for data-sitekey="***************************************" You will find this near the bottom.
 +
 
 +
[[File:Xtreamui13.png|800px]]
 +
 
 +
28. Now to go to your module settings. In the field "Captcha API Key" put the api key from 2captcha. In the "G-Recaptcha Key" put the key you copied from your Panel page source. Check the box "Captcha Required" and Check the box "Refresh" and click save. NOTE: You only click "Refresh" once. This will force ProjectX to login to your panel to get your products. This could take up to a minute to complete. If nothing has happend by then just close go back to "products and services" and reopen the module again. Refresh should auto uncheck once your products have been retrieved.
 +
 
 +
[[File:Xtreamui14.png|800px]]
 +
 
 +
=== Setting up Email templates ===
 +
 
 +
29. Now we need to setup the Email templates. Go to "System Settings" > "Email Templates". Click "Create New Email Template".
 +
 
 +
[[File:step20.jpg|800px]]
 +
 
 +
30. For "Email Type" select "Product/Service". NOTE: It will default to "General" make sure to change that to "Product/Service". For "Unique Name" enter "New Account Information" NOTE; it must be called exactly that and is case-sensitive. Click create.
 +
 
 +
[[File:step21.jpg|800px]]
 +
 
 +
31. For "Subject" again enter "New Account Information" exactly like that. Change "Font Family" to "Courier New" This will make sure Alpha Numeric characters are show properly i.e l and L. Next paste the below test in and click save. NOTE you can edit this but take Note of the service fields such as {$service_username} etc. The {$service_domain} field is retrieved from the earlier module field "Domain URL"
 +
 
 +
 
 +
Dear {$client_name},
 +
 
 +
 
 +
Your order for {$service_product_name} has now been activated. Please keep this message for your records.
 +
Product Details are :
 +
 
 +
Product/Service: {$service_product_name}
 +
 
 +
Payment Method: {$service_payment_method}
 +
 
 +
Amount: {$service_recurring_amount}
 +
 
 +
Billing Cycle: {$service_billing_cycle}
 +
 
 +
Next Due Date: {$service_next_due_date}
 +
 
 +
 
 +
 
 +
Your M3U is :
 +
 
 +
NOTE: This is Case Sensitive:
 +
 
 +
{$service_domain}get.php?username={$service_username}&password={$service_password}&type=m3u_plus&output=ts
 +
 
 +
Your Electronic Programme Guide is:
 +
 
 +
{$service_domain}xmltv.php?username={$service_username}&password={$service_password}
 +
 
 +
Login Details :
 +
 
 +
Server={$service_domain}
 +
 
 +
Username :{$service_username}
 +
 
 +
Password : {$service_password}
 +
 
 +
Thanks for choosing us.
 +
 
 +
{$signature}
 +
 
 +
32. If you use MAG boxes please create a new template with the following as well For "Email Type" select "Product/Service". NOTE: It will default to "General" make sure to change that to "Product/Service". For "Unique Name" enter " New Account Information MAGBOX" NOTE; it must be called exactly that and is case-sensitive. Click create.
 +
 
 +
[[File:step21.jpg|800px]]
 +
 
 +
33. For "Subject" again enter " New Account Information MAGBOX" exactly like that. Change "Font Family" to "Courier New" This will make sure Alpha Numeric characters are show properly i.e l and L. Next paste the below test in and click save. NOTE you can edit this but take Note of the service fields such as {$service_username} etc. The {$service_domain} field is retrieved from the earlier module field "Domain URL"
 +
 
 +
Dear {$client_name},
 +
 
 +
 
 +
Your order for {$service_product_name} has now been activated. Please keep this message for your records.
 +
 
 +
 
 +
Product Details are :
 +
 
 +
Product/Service: {$service_product_name}
 +
 
 +
Payment Method: {$service_payment_method}
 +
 
 +
Amount: {$service_recurring_amount}
 +
 
 +
Billing Cycle: {$service_billing_cycle}
 +
 
 +
Next Due Date: {$service_next_due_date}
 +
 
 +
 
 +
Login Details
 +
 
 +
Portal: {$service_domain}
 +
 
 +
Your MAC is: {$service_username}
 +
 
 +
Thanks for choosing us.
 +
 
 +
{$signature}
 +
 
 +
34. Proceed back to "Products and Services" and lets configure the "Welcome Emails" for your products. For "Trials" select "New Account Information".
 +
 
 +
[[File:step22.jpg|800px]]
 +
 
 +
35. For Paid subscriptions make sure to set the "Welcome Email" to "NONE". When the product is setup it will look for the Template "New Account Information" and send that.
 +
 
 +
[[File:step23.jpg|500px]]
 +
 
 +
=== Configuring Reseller Credits ===
 +
 
 +
To add a product to automatically provision Reseller credits add the product normally. There are a few small differences we will explain here.
 +
 
 +
36. For Reseller Credits, in the Pricing tab set Billing to "One Time".
 +
 
 +
[[File:step24.jpg|800px]]
 +
 
 +
37. In Module settings select the check box "Reseller Credits" and set the "Credit Amount" field to the amount of credits to be added to the reseller account.
 +
 
 +
[[File:Xtreamui15.png|800px]]
 +
 
 +
39. In "Custom Fields" set the "Field Name" to "Reseller" this must start with a capital R. Set "Required Field" > on "Show on Order Form" > on  "Show on Invoice" > on.
 +
 
 +
[[File:step26.jpg|800px]]
 +
 
 +
=== Troubleshooting ===
 +
 
 +
'''''I can't see my products in the module settings.'''''
 +
 
 +
If you are using shared hosting your provider may be blocking outbound ports. Most Shared hosting providers do this. Contact your hosting provider and get them to open the port that your reseller panel is on. i.e XtreamUI default port is 25500 unless this has changed get them to open the port. Most providers will open the port.
 +
We have our own CPanel servers that will work out of the box. [https://xtreamresell.com/index.php?rp=/store/cpanel-shared-hosting click here for pricing]
 +
----
 +
 
 +
'''''My licence has expired but its a valid license'''''
 +
 
 +
In Whmcs go to "System Settings" > "Addon Modules".
  
[[File:step3.jpg|800px]]
+
Click Deactivate.
 +
Click Activate.
 +
Click Configure. Paste your License Key in again, Check the box "Full Administrator" and click Save. (Don't miss a step).
 +
----

Latest revision as of 21:48, 7 April 2021

Overview

This WHMCS module allows Users to be auto-provisioned instantly for Xtream-UI. It Automates the adding of credits for Reseller's and Users.

Requirements

Requirements are the same as WHMCS.

Requirement Minimum Recommended PHP Version 7.2 Latest 7.3 or 7.4 Release PHP Memory Limit 64MB 128MB**

If you are using shared hosting your provider may be blocking outbound ports. Most Shared hosting providers do this. Contact your hosting provider and get them to open the port that your reseller panel is on. i.e XtreamUI default port is 25500 unless this has changed get them to open the port. Most providers will open the port. We have our own CPanel servers that will work out of the box. click here for pricing

Installation and Configuration

Downloading and Uploading

In this tutorial we will show you how to successfully install ProjectX For XtreamUI. We will guide you step by step through the whole installation and configuration process.

1. Log in to our client area and download the module.

Step1.jpg

2. In the downloaded file you might find one or two packages that support different PHP versions. In the most recent versions of the module, you will find only one package that supports PHP 7.2 and later.

PHP71 74.png


3. Extract the package and upload its contents addoonxtreamresell will be uploaded to whmcs/modules/addons xtreamresell will be uploaded to whmcs/modules/servers

The content of the package to upload should look like this.

Xtreamui2.png

Xtreamui3.png

How to License

4. Log in to our client area and get your license key.

Xtreamui4.png

5. In Whmcs go to "System Settings" > "Addon Modules".

Xtreamui6.png

6. Click Activate.

7. Click Configure. Paste your License Key in, Check the box "Full Administrator" and click Save.

Xtreamui5.png

How to Configure

8. Enable "Attempt to load all files" in "Encoded File Loading" by doing this. Click "System Settings" > "General Setting" > "Other" and check the box "Attempt to load all files".

Xtreamui16.png

9. In order to create and configure a product, go to 'System Settings' → 'Products/Services'.

10. Click "Create New Group" and click save.

11. Click "Create a New Product".

Xtreamui7.png

12. Fill in the above information. Make sure you select "XtreamResell" as the module. Click Continue.

Step8.jpg

13. Fill in product Description. You can leave Welcome email as the default. We will setup a Email template later and you can come back and change the Welcome Email. Click continue.

Step9.jpg

14. If the product is for a free trial you would use the above settings. "Auto Terminate/Fixed Term" is the number of days to auto terminate the product. If its a 24 hour trial you would set that to 1 and 2 for 48 hours. Leave that as 0 for Paid Subscriptions.

Step10.jpg

15. For Paid subscriptions you would use something similar to the above. Select "Recurring". The customer would then receive Recurring invoices on a Monthly, Quarterly etc, etc period. Set your pricing. Make sure "Auto Terminate/Fixed Term" is set to 0. Click save changes.


16. Fill in the below information. make sure you add a / of the end of your url's. If you are setting up a trial and wish to select all trial products from the panel select "trial_username". Click save. Your Trial products will now show in the drop down boxes

Xtreamui8.png

17. Note for "trial_username" I have selected the contents of the "Trial_ID" drop down box. If its a trial you must select that drop down box.

Step15.jpg

19. If you don't want the user to choose their own username or password you can check these boxes. This will generate a "Numeric" username and password. We did this because people find it easier to read numbers then complex randomly generated alpha, numeric ones.

Step14.jpg

20. Because this is a free trial we select "Automatically setup the product as soon as an order is placed" and click save.

Xtreamui9.png

21. For Paid Subscriptions. We select "official_username" for "Line Type". We then select products from the drop down boxes. NOTE: in the previous tab where you added your prices they should match. i.e If you only set Monthly pricing then you will only setup Monthly here.

Step17.jpg

21. Because this is a paid subscription we set "Automatically setup the product as soon as the first payment is received". So once whmcs receives payment it will automatically setup the user.

Step18.jpg

22. In the next tab "Custom Fields". in the field "Field Name" enter "Username" NOTE: Its starts with a capital U. If the line is for a mac you would enter "MAC" here. NOTE: All in capitals.(if you are setting up a mac in the previous step you would select "official_mac or trial_mac from the "line Type" drop down box. If you want the user to choose their own username you would check all three boxes. "Required Field" "Show on Order Form" "Show on Invoice". If you selected "Random Username" in the previous section you will only check. "Required Field" "Show on Invoice" If you want to use the password generated by XUI make sure in the previous section you have not checked "Random Username" and select "Required Field" "Show on Invoice" here.

23. Click "save" your product has now been setup.

Working with captchas

ProjectX for XtreamUI has the ability to solve Captchas should your panel be protected by one. Please complete the following.

24. Register with 2captcha here and add credits. Prices are very reasonable. Starting from 0.5 USD for 1000 solved CAPTCHAs

https://2captcha.com?from=7465674

Xtreamui10.png

25. Once Signed up go to your dashboard and copy your "API Key" and enable "100 recognition".

Xtreamui11.png

26. Go to your panel login screen and "right click" anywhere on the page and click "Page Source".

Xtreamui12.png

27. look for data-sitekey="***************************************" You will find this near the bottom.

Xtreamui13.png

28. Now to go to your module settings. In the field "Captcha API Key" put the api key from 2captcha. In the "G-Recaptcha Key" put the key you copied from your Panel page source. Check the box "Captcha Required" and Check the box "Refresh" and click save. NOTE: You only click "Refresh" once. This will force ProjectX to login to your panel to get your products. This could take up to a minute to complete. If nothing has happend by then just close go back to "products and services" and reopen the module again. Refresh should auto uncheck once your products have been retrieved.

Xtreamui14.png

Setting up Email templates

29. Now we need to setup the Email templates. Go to "System Settings" > "Email Templates". Click "Create New Email Template".

Step20.jpg

30. For "Email Type" select "Product/Service". NOTE: It will default to "General" make sure to change that to "Product/Service". For "Unique Name" enter "New Account Information" NOTE; it must be called exactly that and is case-sensitive. Click create.

Step21.jpg

31. For "Subject" again enter "New Account Information" exactly like that. Change "Font Family" to "Courier New" This will make sure Alpha Numeric characters are show properly i.e l and L. Next paste the below test in and click save. NOTE you can edit this but take Note of the service fields such as {$service_username} etc. The {$service_domain} field is retrieved from the earlier module field "Domain URL"


Dear {$client_name},


Your order for {$service_product_name} has now been activated. Please keep this message for your records. Product Details are :

Product/Service: {$service_product_name}

Payment Method: {$service_payment_method}

Amount: {$service_recurring_amount}

Billing Cycle: {$service_billing_cycle}

Next Due Date: {$service_next_due_date}


Your M3U is :

NOTE: This is Case Sensitive:

{$service_domain}get.php?username={$service_username}&password={$service_password}&type=m3u_plus&output=ts

Your Electronic Programme Guide is:

{$service_domain}xmltv.php?username={$service_username}&password={$service_password}

Login Details :

Server={$service_domain}

Username :{$service_username}

Password : {$service_password}

Thanks for choosing us.

{$signature}

32. If you use MAG boxes please create a new template with the following as well For "Email Type" select "Product/Service". NOTE: It will default to "General" make sure to change that to "Product/Service". For "Unique Name" enter " New Account Information MAGBOX" NOTE; it must be called exactly that and is case-sensitive. Click create.

Step21.jpg

33. For "Subject" again enter " New Account Information MAGBOX" exactly like that. Change "Font Family" to "Courier New" This will make sure Alpha Numeric characters are show properly i.e l and L. Next paste the below test in and click save. NOTE you can edit this but take Note of the service fields such as {$service_username} etc. The {$service_domain} field is retrieved from the earlier module field "Domain URL"

Dear {$client_name},


Your order for {$service_product_name} has now been activated. Please keep this message for your records.


Product Details are :

Product/Service: {$service_product_name}

Payment Method: {$service_payment_method}

Amount: {$service_recurring_amount}

Billing Cycle: {$service_billing_cycle}

Next Due Date: {$service_next_due_date}


Login Details

Portal: {$service_domain}

Your MAC is: {$service_username}

Thanks for choosing us.

{$signature}

34. Proceed back to "Products and Services" and lets configure the "Welcome Emails" for your products. For "Trials" select "New Account Information".

Step22.jpg

35. For Paid subscriptions make sure to set the "Welcome Email" to "NONE". When the product is setup it will look for the Template "New Account Information" and send that.

Step23.jpg

Configuring Reseller Credits

To add a product to automatically provision Reseller credits add the product normally. There are a few small differences we will explain here.

36. For Reseller Credits, in the Pricing tab set Billing to "One Time".

Step24.jpg

37. In Module settings select the check box "Reseller Credits" and set the "Credit Amount" field to the amount of credits to be added to the reseller account.

Xtreamui15.png

39. In "Custom Fields" set the "Field Name" to "Reseller" this must start with a capital R. Set "Required Field" > on "Show on Order Form" > on "Show on Invoice" > on.

Step26.jpg

Troubleshooting

I can't see my products in the module settings.

If you are using shared hosting your provider may be blocking outbound ports. Most Shared hosting providers do this. Contact your hosting provider and get them to open the port that your reseller panel is on. i.e XtreamUI default port is 25500 unless this has changed get them to open the port. Most providers will open the port. We have our own CPanel servers that will work out of the box. click here for pricing


My licence has expired but its a valid license

In Whmcs go to "System Settings" > "Addon Modules".

Click Deactivate. Click Activate. Click Configure. Paste your License Key in again, Check the box "Full Administrator" and click Save. (Don't miss a step).