If you use another billing system or a script instead of BILLmanager, you need to make some changes to the system for automatic reselling of modules.
When a client purchases a module from a control panel, for example, from ispmanager, the system sends requests to a third-party system which must emulate BILLmanager API to handle the orders.
There are two ways to set up interaction with a third-party system:
Automatic order. The control panel sends all the requests required for automatic order and payment to the system. A control panel is a software product where a client purchases a module, for example, ISPmanager.
Manual order. The control panel won't try to order a module automatically. A client will be redirected to a partner's website (its URL is built in into a license).
You need to inform ISPsystem managers what variant you want to use, and they will configure the settings in the ISPsystem billing system.
The following functions are used for automatic order of modules:
Receive a list of tariff plans
The control panel where clients can make order requests a list of modules and their prices from the billing system.
The following XML is sent:
<doc> <pricelist> <id>277</id> <additionintname>Virusdie</additionintname> <price currency="EUR"> <period cost="913.9286" type="month" length="1">monthly</period> </price> </pricelist> </doc>
id - module tariff id.
additionintname - module name. Possible values:
Virusdie - VirusDie module for ISPmanager Lite.
VirusDieBusiness - VirusDie module for ISPmanager Business.
CloudLinux - CloudLinux module for IISPmanager.
KernelCare - KernelCare module for IISPmanager Lite.
Softaculous - Softaculous module for ISPmanager.
DDoSGUARD - DDoSGUARD module for ISPmanager.
price - prices for a selected period. When paying and uploading the price, the system always uses <period> with type="month" and length="1".
Receive the contents of the Cart
You will received the XML where the '/doc/list[@name='itemlist']/elem' elements will be checked. If they are found, the modules will be added into the Cart, but the control panel won't try to pay for them automatically. The user will be redirected to the system to complete the order manually.
Add an order into the Cart
The following request will be sent
item - license id associated with the module.
period and pricelist are taken from the list of tariff plans (/doc/pricelist/id and /doc/pricelist/price/period/@length).
The following XML will be sent:
<doc> <billorder.id>1234</billorder.id> </doc>
billorder.id - order id.
id - id that was received when placing an order.
Log into the system
key - a random sequence of symbols.
To get a response, the client will be redirected to:
key - the sequence from the previous call
backlevel - user role in the panel
backname - control panel name
backurl - <Control panel URL>?startform=plugin
To order modules manually, you need to receive a list of tariff plans to get the information about module prices.
When the client purchases a module, the control panel will redirect him to the partner's website. To do so, the system generates the request:
<System URL>?module=<module name>&license=<License ID>&ip=<License IP>