Author Topic: WHMCS integration with CWP  (Read 52004 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
WHMCS integration with CWP
« on: June 29, 2017, 08:03:02 PM »
Hello guys,
After having so much problems with integration of WHMCS and CWP I rewrote the WHMCS module almost from zero. Ok, mine also has errors which I will fix and then I will provide it encoded free of charge with all the improvements. For the moment I will provide you a fixed copy from http://wiki.centos-webpanel.com/cwp-account-api which was the original. In the original one it`s supposed that you have option in WHMCS to register/transfer domain. In the fixed version you don`t need it. If you don`t have option for register/transfer domain then the user domain will become automatic user.your-server-domain-name.tld(ex. johndoe.server.com). If you have the option for registering/transfering domains then the domain will be what the user register/transfer (ex. my-domain-with-you.com).
How to install the script:
1. Download -> here <- the script in your /path/to/whmcs/modules/servers/ (ex. /home/hosting/public_html/modules/servers/)
2. Unzip it (unzip centoswebpanel.zip)
3. Login to your WHMCS Admin panel
4. Go to Setup -> Product/Services -> Servers
5. Press 'Create New Group' and name it how you want
6. Press 'Add New Server'
7. Scroll down to 'Server Details'
8. On 'Type' choose 'Centoswebpanel'
9. Open in your browser -> Random.org <- and choose a random generated password
10. Paste this password in the 'Access Hash' field and press 'Save Changes'
11. Paste this password in /usr/local/cwp/.conf/api_key.conf
12. Open /usr/local/cwp/.conf/api_allowed.conf with your favourite editor and enter inside the IP address of the WHMCS (if the WHMCS and CWP are on the same server than enter 127.0.0.1)
13. Go to Setup -> Product/Services -> Product/Services
14. Press 'Create a New Product'
15. Choose and write name of your product
16. Go to 'Module Settings' tab and choose 'Module Name: Centoswebpanel
17. In the settings shown below edit only Package Number (Package Number 1 is package with name 'default' in CWP, if you add new package it will be Package Number 2)
18. Choose 'Do not automatically setup this product' and press 'Save Changes'
Hooray! You are ready!!!
Don`t forget to fix the Pricing of the Product/Service that you offer :)
If you have any questions or problems please PM me or ask on root@born2host.com
The script is opensource. Tested on WHMCS 6.3.1 and 7.1.2. Have fun!
Please, if you download and use the script, leave a comment how is it working and on what version of WHMCS you tested it. It will be useful for me to fix errors and for other users to know on which versions of WHMCS is tested and working. Thank you.
« Last Edit: June 29, 2017, 08:07:39 PM by darkness »
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: WHMCS integration with CWP
« Reply #1 on: July 01, 2017, 04:22:38 PM »
I'd like to download and use the script but there are no files in your download "centoswebpanel.zip"

Offline
***
Re: WHMCS integration with CWP
« Reply #2 on: July 02, 2017, 07:44:45 PM »
Sorry, my bad.
Download this tar archive: CentOSWebPanel
If again is not working let me know. But I extracted it and the file is inside.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: WHMCS integration with CWP
« Reply #3 on: July 06, 2017, 06:52:25 PM »
I am having issues reaching your files and website. You should check your DNS.

Offline
***
Re: WHMCS integration with CWP
« Reply #4 on: July 06, 2017, 09:52:14 PM »
I`m sorry. It was my bad. During the tests of the OpenVZ web panel I did some changes to my named.conf and I forgot to reverse them. Now it`s working. At least google says so:
Code: [Select]
[root@born2host named]# nslookup born2host.com
Server:         8.8.8.8
Address:        8.8.8.8#53
Non-authoritative answer:
Name:   born2host.com
Address: 77.236.172.141
[root@born2host named]#
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
***
Re: WHMCS integration with CWP
« Reply #5 on: July 08, 2017, 04:49:33 PM »
During to a planned maintanence Born 2 Host will be down since 09/07/2017 00:30 until 09/07/2017 14:30 (+/- 2h). Any downloads will be unavailable until that time. Sorry for any problems that this may cause.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: WHMCS integration with CWP
« Reply #6 on: July 17, 2017, 08:32:41 AM »
I think I have set up both editable files for the lines and password, in ip I added 127.0.0.1 I have the same control panel and whmcs installations on the same server. I keep having problems,
Order Accept Encountered Problems
Allowed IP's not set or you do not have access from IP

Offline
***
Re: WHMCS integration with CWP
« Reply #7 on: July 21, 2017, 08:26:04 AM »
Do you have NAT enabled? Did you checked all the permissions of the files?
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: WHMCS integration with CWP
« Reply #8 on: July 21, 2017, 05:27:00 PM »
Sorry for the delay in responding. Where do I disable NAT? What permissions do you need?

Offline
***
Re: WHMCS integration with CWP
« Reply #9 on: July 22, 2017, 02:29:22 PM »
Do not disable NAT, just add the internal IP of the server (ex. 192.168.1.2) as allowed in api_allowed.conf.
For me the permissions are those:
Code: [Select]
-rw-r--r-- 1 hosting hosting 6107 Jun 29 22:58 centoswebpanel.php-rw-r--r-- is:
Code: [Select]
chmod 644 fileDon`t forget to change the owner of the file not to be root:
Code: [Select]
chown -R username.usernameYou can check it by:
Code: [Select]
(small letters): LL /home/user_where_is_your_whmcs/public_html/modules/servers/centoswebpanel/
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: WHMCS integration with CWP
« Reply #10 on: October 09, 2017, 06:04:54 PM »
The download links do not seem to be available any longer (from the original posting).  Are they still available.  I am looking to add in our CWP server to our WHMCS system and this looks to be the solution. Thanks

Offline
***
Re: WHMCS integration with CWP
« Reply #11 on: October 09, 2017, 10:29:31 PM »
Sorry for the missing files. I was working on them and forgot to re-upload them. I was looking for a way to fix the error when the domain is not resolved to an IP but still no success. I will re-upload the files in few minutes. You can download it now at CentOS Web Panel link.
« Last Edit: October 09, 2017, 10:46:12 PM by darkness »
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...

Offline
*
Re: WHMCS integration with CWP
« Reply #12 on: October 10, 2017, 08:01:46 PM »
Sorry for the missing files. I was working on them and forgot to re-upload them. I was looking for a way to fix the error when the domain is not resolved to an IP but still no success. I will re-upload the files in few minutes. You can download it now at CentOS Web Panel link.

Thank you !  Just a FYI
Your website / server seems to be unavailable, I will try again later.  Thanks!

Offline
*
Re: WHMCS integration with CWP
« Reply #13 on: November 04, 2017, 01:11:40 PM »
I've installed this on my WHMCS client and I cannot get it to work. Nothing shows in the error log and the string created is correct (looking at the module log and testing it directly). I am running V7.3.0.

Offline
***
Re: WHMCS integration with CWP
« Reply #14 on: November 04, 2017, 06:17:15 PM »
I didn`t tested it on WHMCS 7.3.0 yet. Can you login to your WHMCS, go to Utilities -> Logs -> Module Log. From there Enable Debug Logging. Then try to add user through WHMCS and check the log on the same place. Let me know what`s the error. Waiting for your reply.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...