Hosting Beginner Guide:Integration with your web-site

From ISPWiki
Jump to: navigation, search

BILLmanager enables to place tariff plans on your web-site via BILLmanager API. Your client will see a tariff plan configurator on your web-site, log in to the billing panel, and place an order.

Shop window

BILLmanager has a built-in Shop-window

To activate a shop-window, on the server with BILLmanager, add the following string into /usr/local/mgr5/etc/ihttpd.conf

allow_origin https://<site url>

Example:

 listen {
        ip 172.31.223.13
        nochunked
        allow_origin https://thecompany.com
 }

Restart

/usr/local/mgr5/sbin/ihttpd --restart

Links to tariff plans

BILLmanager allows to configure a tariff plan directly on your web-site. In the tariff plan edit form you can find order links:

Hosting Beginner Guide tariff14.png

Pre-defined links

  • To place a link to the list of tariff plans, copy Tariff plan order URL
  • To place a link to a certain plan, copy the link with the name of order period

If you want to use custom configuration

This is the link to order a Shared hosting service for 1 month:

https://172.31.223.13/billmgr?func=register&redirect=startpage%3Dvhost%26startform%3Dvhost%252Eorder%252Eparam%26pricelist%3D1%26period%3D1%26project%3D1

Where

  • func=register. The registration function, if a client is not registered in BILLmanager. A client account will be created, and the client will be redirected to the next function.
  • redirect=startpage%3Dvhost%26startform%3Dvhost%252Eorder%252Eparam%26pricelist%3D1%26period%3D1%26project%3D1 - describes the function that will be executed after registration. To convert it to a readable format, execute URL Decode (once you have changed parameters, execute URL Encode). Use http://meyerweb.com/eric/tools/dencoder/

Then:

startpage=vhost&startform=vhost%2Eorder%2Eparam&pricelist=1&period=1&project=1
  • startpage=vhost. A product type. In our case - Shared hosting
  • startform=vhost%2Eorder%2Eparam. A start form - edit order parameters. (vhost - Shared hosting)
  • pricelist=1 - tariff id
  • period=1 - period in months
  • project=1 - project id (in Standard and Advanced - always 1)

In order to add specific options into the link, locate the add-on's id in the plan's "Configuration"

Hosting Beginner Guide tariff15.png
Hosting Beginner Guide tariff16.png

Add addon_<add-on id>=<add-on number>

Something like that:

startpage=vhost&startform=vhost%2Eorder%2Eparam&pricelist=1&period=1&project=1&addon_12=1&addon_13=15&addon_14=2

Execute URL Encode, and add the general link:

https://172.31.223.13/billmgr?func=register&redirect=startpage%3Dvhost%26startform%3Dvhost%252Eorder%252Eparam%26pricelist%3D1%26period%3D1%26project%3D1%26addon_12%3D1%26addon_13%3D15%26addon_14%3D2