This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[MODULE] WHMCS
#1
[MODULE] WHMCS
I've modified the old WHMCS module for ZPanel and ZPanel module for WHMCS, tested them with Sentora as well as changed most "ZPanel" to "Sentora"

These modules allow WHMCS to create users, suspend, unsuspend, terminate, change password and change packages on Sentora

The modules have been tested with WHMCS 5.3.13, 5.3.14, 6.1, 6.2 & 6.3, Sentora 1.0 - 1.0.3 and CentOS 7/Debian 8

Original creator(s):
WHMCS Module: Mathieu Légaré Mathieu Légaré
ZPanel Module: Knivey

Requirements:
WHMCS installed (doesn't have to be on the same machine as the sentora installation(s))
The WHMCS and Sentora installation running on PHP 5.6 or above
The Sentora module requires the following default modules to function (enabled by default): manage_clients and domain

Installation:
To install the Sentora module enter the following commands in your terminal

Code:
zppy repo add zppy.grid-servers.net
zppy update
zppy install whmcs


To install the WHMCS module, download the whmcs.zip from the WHMCS module page in sentora and extract it to the root directory of WHMCS


For a more detailed readme, check the github repository: https://github.com/Rynoxx/sentora-whmcs
A detailed guide was also posted by conceptr980 here.

Updating:
To update the Sentora module enter the following commands to your terminal:
Code:
zppy update
zppy upgrade whmcs
To update the WHMCS module repeat the first two steps of the installation

To update the Sentora module from 2.3.4 to 2.3.7 enter the following commands to your terminal:
Code:
zppy update
zppy remove whmcs234
zppy install whmcs
Updating the WHMCS module from 2.3.4 to 2.3.7 is done like a regular update

What to do when errors occur:
  • Enable module debug logging in WHMCS (located under Utilities > Logs > Module Log)
  • Do the API call you attempted to do (e.g. create the user/accept order, unsuspend/suspend etc)
  • Post on the Sentora forum and tag me in the post (By typing @[Rynoxx]) include the problem and the output of the WHMCS debug log


Recent updates:Click here for a full changelog

2.3.8
- Fixes issue with package upgrade

2.3.7
- Reverted back to custom api functions for user creation
- Added the ability to set custom admin dir in Sentora
- Enabled the ability to disable single domain rather than the whole account.
- Added a basic email template for WHMCS

2.3.6
- Improved error messages

2.3.5
- Added the ability to customize the generated username
- Further migration towards using default sentora modules for API calls

2.3.4
- Extending the error messages further for certain cases (no server configured for the product/order and no IP/Hostname assigned to a server)
- Put some debug code behind "If Debug" statements

2.3.3
- Allows the option to automatically create default DNS records upon account creation
- Note added to the 'Reseller' option.
- Misc small changes.

2.3.2
- Fixed [issue MySupport Addon](https://github.com/Rynoxx/sentora-whmcs/issues/2)
Reply
#2
RE: [MODULE] WHMCS
Hello,
I am running Sentora on Centos 6.6 and I installed the whmcs module. Once I installed the module and edited the module edit rights in the module admin tool, I had to re-log into Sentora. Upon logging back into the panel it said module not found and the entire panel was blank. Could you test this with Centos 6.6 and patch it please.

Edit:
After I went and looked for that error in the forums I found a post to recompile the database. So I removed the module and recompiled the database. On a whim, I reinstalled the module and now it is working. Now the issue that I am having is the directions on how to configure everything. I read your read.me on the github and I am still not getting the sites set up.
The error I am getting is "Account couldn't be created, the API Request failed." I am not sure if it is because I left out the name servers. This is where I am confused, I am using cloudflare and they have weird name servers. Should I put those in?
Russ
Co-Owner
KTMGaming.net
Reply
Thanks given by:
#3
RE: [MODULE] WHMCS
(06-09-2015, 11:34 AM)HogensHero Wrote: Hello,
I am running Sentora on Centos 6.6 and I installed the whmcs module. Once I installed the module and edited the module edit rights in the module admin tool, I had to re-log into Sentora. Upon logging back into the panel it said module not found and the entire panel was blank. Could you test this with Centos 6.6 and patch it please.

Edit:
After I went and looked for that error in the forums I found a post to recompile the database. So I removed the module and recompiled the database. On a whim, I reinstalled the module and now it is working. Now the issue that I am having is the directions on how to configure everything. I read your read.me on the github and I am still not getting the sites set up.
The error I am getting is "Account couldn't be created, the API Request failed." I am not sure if it is because I left out the name servers. This is where I am confused, I am using cloudflare and they have weird name servers. Should I put those in?

HogensHero
When it comes to the Nameservers, put the ones you've got from Cloudflare even if the names are weird.
And the reason the request failed is because the WHMCS module isn't getting a proper response, not entirely sure why, but one reason could be that you've put the wrong API info in WHMCS, for now I'll add a simple debug that outputs the PHP error to whmcsdirectory/admin/sentora_module_error.txt

I'll test myself to see what I can do to resolve this as well. And soon I'll fix so that my module uses the WHMCS Module debug system to ease the debugging in situations like these.

Edit: Here's a link to the new version of sentora.php (put it in whmcsdirectory/admin/modules/servers/sentora/) https://raw.githubusercontent.com/Rynoxx...entora.php

Edit2: HogensHero I've added support for the WHMCS debug log, enable it in WHMCS and give me the output of the debug log, unless you're capable of fixing the error yourself (one being invalid API information)
Reply
Thanks given by: HogensHero
#4
RE: [MODULE] WHMCS
(06-09-2015, 06:00 PM)Rynoxx Wrote:
(06-09-2015, 11:34 AM)HogensHero Wrote: Hello,
I am running Sentora on Centos 6.6 and I installed the whmcs module. Once I installed the module and edited the module edit rights in the module admin tool, I had to re-log into Sentora. Upon logging back into the panel it said module not found and the entire panel was blank. Could you test this with Centos 6.6 and patch it please.

Edit:
After I went and looked for that error in the forums I found a post to recompile the database. So I removed the module and recompiled the database. On a whim, I reinstalled the module and now it is working. Now the issue that I am having is the directions on how to configure everything. I read your read.me on the github and I am still not getting the sites set up.
The error I am getting is "Account couldn't be created, the API Request failed." I am not sure if it is because I left out the name servers. This is where I am confused, I am using cloudflare and they have weird name servers. Should I put those in?

@[HogensHero]
When it comes to the Nameservers, put the ones you've got from Cloudflare even if the names are weird.
And the reason the request failed is because the WHMCS module isn't getting a proper response, not entirely sure why, but one reason could be that you've put the wrong API info in WHMCS, for now I'll add a simple debug that outputs the PHP error to whmcsdirectory/admin/sentora_module_error.txt

I'll test myself to see what I can do to resolve this as well. And soon I'll fix so that my module uses the WHMCS Module debug system to ease the debugging in situations like these.

Edit: Here's a link to the new version of sentora.php (put it in whmcsdirectory/admin/modules/servers/sentora/) https://raw.githubusercontent.com/Rynoxx...entora.php

Edit2: @[HogensHero] I've added support for the WHMCS debug log, enable it in WHMCS and give me the output of the debug log, unless you're capable of fixing the error yourself (one being invalid API information)

Rynoxx
After being obnoxiously busy, I have finally had time to test this. I added the name servers as you suggested and removed the use ssl connection check. It is working now.

I only have two small issues that maybe you can look into.

1. When the user is made in Sentora they are put into the reseller class. Is there any way we can set it so we can choose where they are put? It also did not create the domain in the account when the account was created.

2. I have an error in the whmcs module in Sentora about whmcs version.
Warning: WHMCS has reported that it's version is , which doesn't match the version of the sentora module (133)!

If this warning doesn't go away on the next API call from WHMCS then this issue should be fixed as soon as possible!

3. Whmcs 1.6 is on the cusp of being released. Do you have plans on working on getting this to work with that version as well?

Other than that awesome job at getting this module working.
Russ
Co-Owner
KTMGaming.net
Reply
Thanks given by:
#5
RE: [MODULE] WHMCS
(06-12-2015, 03:00 PM)HogensHero Wrote:
(06-09-2015, 06:00 PM)Rynoxx Wrote:
(06-09-2015, 11:34 AM)HogensHero Wrote: -long quote-
-long quote-

@[Rynoxx]
After being obnoxiously busy, I have finally had time to test this. I added the name servers as you suggested and removed the use ssl connection check. It is working now.

I only have two small issues that maybe you can look into.

1. When the user is made in Sentora they are put into the reseller class. Is there any way we can set it so we can choose where they are put? It also did not create the domain in the account when the account was created.

2. I have an error in the whmcs module in Sentora about whmcs version.
Warning: WHMCS has reported that it's version is , which doesn't match the version of the sentora module (133)!

If this warning doesn't go away on the next API call from WHMCS then this issue should be fixed as soon as possible!

3. Whmcs 1.6 is on the cusp of being released. Do you have plans on working on getting this to work with that version as well?

Other than that awesome job at getting this module working.

HogensHero
1. There's an option in WHMCS when setting up the product/service to select whether or not the user should be reseller, though it indeed seems to be putting them in the reseller group either way. I'll try to fix it ASAP

The domain should be created automaticly, I'll have to check this as well.

2. That warning should be there as long as the version of your WHMCS module and Sentora module aren't matching, but mine doesn't seem to disappear either. I'll try to fix this ASAP as well.

3. As long as it comes out within 9 months or so (that's how long my license include updates from now) I'll try to make sure that it works.

Thank you Smile

Edit: Errors mentioned above has now been fixed in version 1.3.5. Two of which were caused by me being clumsy... (Domain creation & Version check)
Reply
Thanks given by:
#6
RE: [MODULE] WHMCS
Hello,
Good job so far with the whmcs improvements Rynoxx (Thump Up) as things started to get more clear specially with the logs feature.

On the other hand im still facing an error while creating a product in whmcs "Account couldn't be created, the API Request failed". i followed the suggestions you provided in the previous threads with no luck.

Error in the module log:
Caught exception: Unable to parse response body into XML: String could not be parsed as XML

Any other workaround to debug it ??
Reply
Thanks given by:
#7
RE: [MODULE] WHMCS
conceptr980

I was having the same issue, make sure the api key is set to "1,key..." with no space and double check your ssl if you are not using ssl unchecked ssl at the bottom. This is what I did and bingo started working.
Russ
Co-Owner
KTMGaming.net
Reply
Thanks given by:
#8
RE: [MODULE] WHMCS
Weird,

as i still get the same error
how about if i review the the settings as im a bit noobish on this.

Type: Sentora
Name: Empty
Pass:Empty
Access Hash: 1,Key
Untick SSL

Doesnt look hard to understand.

Does the error u used to get is the same as mentioned above ??
Reply
Thanks given by:
#9
RE: [MODULE] WHMCS
(06-13-2015, 07:25 AM)conceptr980 Wrote: Weird,

as i still get the same error
how about if i review the the settings as im a bit noobish on this.

Type: Sentora
Name: Empty
Pass:Empty
Access Hash: 1,Key

Untick SSL

Doesnt look hard to understand.

conceptr980, that looks right, and make sure that the hostname/ip is right. I'll see if I can make the exception messages clearer by including more/better data.
Reply
Thanks given by:
#10
RE: [MODULE] WHMCS
Thanks Rynoxx for the effort even though it didnt work for me yet.

By the way, im testing this on AWServer (Windows) maybe thats why !! even though the original module by Knivey return nothing while creating an order (Yours have something to read in the logs at least).

The php error returns the following:
PHP Notice: Array to string conversion in C:\AWServer\panel\modules\whmcs\code\controller.ext.php on line 265
PHP Warning: strtolower() expects parameter 1 to be string, array given in C:\AWServer\panel\modules\whmcs\code\controller.ext.php on line 277

if that would provide any click.
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
[MODULE] phpMyAdmin-AU (Auto-Update) TGates 14 40 ,534 06-15-2021, 06:54 AM
Last Post: TGates
[MODULE] SenBrand - Basic Branding module for Sentora TGates 20 43 ,247 06-04-2021, 11:47 AM
Last Post: ccr1969
[MODULE] CoinCorner BitCoin Module Xversion 4 13 ,025 06-03-2021, 05:02 AM
Last Post: zHostingSolutions

Forum Jump:


Users browsing this thread: 1 Guest(s)