Install and Configure xBilling on Sentora CP

How to install xBilling a client subscription and payment management module for Sentora, It comes with several features (complete list of features to follow soon).

Disclaimer: In this post I’m sharing my experiences with you and do not claim to be an expert on this subject. My intent is to help you in your research. Proceed at your own risk. Here are some examples of what I’ve used successfully in various server environments.

Installation 
# Add repository from command line:
zppy repo add zpx.imerlabs.com
# Update zppy with:
zppy update
# Then run
zppy install xbilling


You should now find the xBilling module in Admin/ModuleAdmin section of your control panel.

Alternative Installation
You can install from the Module Admin by uploading the "zpp" file which can be found at: http://zpx.imerlabs.com/xbilling.zpp.
# Updates Code:
zppy upgrade xbilling
 # Remove Code:
zppy remove xbilling

Attention!
Because this module was written for zpanel you will need to make the following quick change.
instructions: In /etc/sentora/panel/modules/xbilling/code/controller.ext.php

Change from
static $module_db = 'zpanel_xbilling';
static $server_app = 'zpanel';

Change to
static $module_db = 'sentora_xbilling';
static $server_app = 'sentora';


Upon successful installation of xBilling, you will need the Frontend module to start offering signups and subscriptions to your customers. The frontend package can be downloaded from inside xBilling.

Configuration.

Enabling the xBillimg Module You can now enable the xbilling module from the admin modules checkbox.
1. Enable xbilling for groups that you wish to allow using the reseller services.

Log into control panel as zadmin
From main menu select admin/module admin
Scroll to bottom of Configure Modules
Enable the xbilling module and select the checkbox to enable for reseller groups.
Save changes

2. From main menu select Reseller/xBilling
Select Website Setting and complete your hosting company details, and billing URL example: http://mydomain.tld/xbilling_frontend, currency and the Google reCaptcha keys.
Save.

Uploading xbilling_frontend and config.php
From main menu Reseller/xBilling Website Setting Important Downloads section download config.php, open in an text editer and add your control panel url on line 14. Which should like below linw.
$cfg['panel_url'] = 'panel.mydomain.tld';
Save

Again from the Important Downloads section download Front-end billing package, unzip and upload both config.php and xbilling_frontend to your root directory of mydomain.tld.

Plans and packages
From main menu select Reseller/Package manager.
Configure and save the packages you want to offer

4. Now create some service plan prices/time period From main menu select Reseller/xBilling service Plans menu item.



5. Add some description to your plans from xBilling Packages menu item, this description will appear on the front. You can edit package prices from the manage links.




To view your frontend goto: http://mydomain.tld/xbilling_frontend


Troubleshooting (fopen error)
array(4) { ["type"]=> int(2) ["message"]=> string(108) "fopen(http://panel.mydomain.co.uk/api/xbilling): failed to open stream: no suitable wrapper could be found" ["file"]=> string(106) "/var/sentora/hostdata/123/public_html/mydomain_co_uk/xbilling_frontend/classes/xmwsclient.class.php" ["line"]=> int(112) } Problem reading data from http://panel.mydomain.co.uk/api/xbilling


The API loading is made by a fopen() function and this function is disabled for security reasons on my server. So, I enabled this function:
Open php.ini:
sudo vim /etc/php5/apache2/php.ini
Find this: allow_url_fopen = Off
Change to:
allow_url_fopen = On
Quit text editor: :x to save
Restart Apache: service apache2 restart

Whether to allow the treatment of URLs (like http:// or ftp://) as files.
http://php.net/allow-url-fopen

xBilling Manual

Install and Configure xBilling on Sentora CP Install and Configure xBilling on Sentora CP Reviewed by Taner Temel on 21:26:00 Rating: 5
Post a Comment
Powered by Blogger.