How to resell ISPsystem's modules

From ISPWiki
Jump to: navigation, search

When you install additional paid modules, COREmanager automates their purchase. Where the client will be redirected to from his control panel, depends on the IP address which was last used to obtain a license for this particular control panel. So, if the IP address belongs to one of ISPsystem's Hosting Provider Partners, and that Partner set up reselling of ISPsystem's modules and has corresponding tariffs in place, then the end customer will be redirected to that Partner's billing system to make a purchase, after entering his registration details to Partner's billing system.

Alternatively, the end customer will be offered to purchase a module directly from ISPsystem in accordance with retail tarriffs, by registering his license with ISPsystem (obtaining ISPsystem ID), under an existing user account, or by opening a new one. In case the license in question is already registered by the user with ISPsystem, then the user will be asked to enter his log-in details for my.ispsystem.com to proceed. At this point, the module will be added to the shopping cart at my.ispsystem.com for that user, where the payment can be made.

Once the module purchase is made, the control panel will download an updated license, which will include obtained modules.

Configuration of the billing system

First of all, you will need to:

  • become ISPsystem's Hosting Provider Partner
  • send us your IP ranges
  • inform us of the URL of your billing panel for module purchase requests from your clients

BILLmanager configuration

If you use BILLmanager 5 for reselling, you need to import tariff plans from my.ispsystem.com, and allow all BILLmanager clients to order them. If you use BILLmanager 4, complete the following steps:

  1. Add and configure a new product type, enter addition into the "Internal name" field
  2. Configure two add-ons with internal names license and accountlimit (some modules may need them)
  3. Configure the product type with the item internal name (it is used for specifying id of the license associated with the module)
  4. Import a tariff plan from my.ispsystem.com
  5. Update BILLmanager to the last version
  6. Set up a plug-in with a required architecture from http://download.ispsystem.com/extras/additionsale/
  7. Specify a module type in the tariff plan configuration form (this field will be displayed after you install the plug-in)
    • Virusdie - VirusDie for ISPmanager Lite
    • VirusDieBusiness - VirusDie for ISPmanager Business
    • CloudLinux - CloudLinux for ISPmanager
    • KernelCare - KernelCare for ISPmanager Lite
    • Softaculous - Softaculous for ISPmanager
    • vmware - VMware vCloud for BILLmanager
    • vmwarevds - VMware vCloud, allows to sell VPS for BILLmanager

Complete the steps below to set up a plug-in:

  • make a backup copy of the /usr/local/ispmgr/bin/billmgr file, as the original file will be changed into the plug-in. It is required for allowing publick access to the pricelist.export function
  • download the module from http://download.ispsystem.com/extras/additionsale/ and extract files into /usr/local/ispsmgr/. The /usr/local/ispmgr/bin/billmgr file will be changed, the following two files will be added:
    • /usr/local/ispmgr/etc/billmgr_mod_additionsale.xml
    • /usr/local/ispmgr/lib/svradditiondale.so

Once completed, activate the module reselling option, and proceed with the configuration of a tariff plan.

Processing of requests by third-party billing systems

In order to process an order for the module, a third-party billing system needs to emulate BILLmanager's API, where the following request types need to be processed:

The following steps depend on configuration made for a certain reseller.

Getting a list of tariff plans

  • Receipt of tariff lists: <BILLmanager URL>?func=pricelist.export&itemtype=addition. An XML-document in the following format should be sent to stdout :
<doc>
  <pricelist>
    <id>277</id>
    <additionintname>Virusdie</additionintname>
    <price currency="RUB">
      <period cost="913.9286" type="month" length="1">monthly</period>
    </price>
  </pricelist>
</doc>

The <period> parameter with type="month" and length="1" is used for generating a list and order. additionintname should match the internal name of the module.

Further steps may vary depending on the settings made for a certain reseller.

Automatic order of modules

  • Getting services in Cart: <BILLmanager URL>?authinfo=<name>:<password>&func=backet. The resulting XML will be checked for /doc/list[@name='itemlist']/elem elements. If they are found, modules will be added to Cart but the billing system won't try to buy them. A client will be redirected to BILLmanager to purchase them manually.
  • Placing order to Cart: <BILLmanager URL>?authinfo=<name>:<password>&func=addition.order.param&item=?&period=?&pricelist=?&sok=ok. Where "item" is license ID, "period" and "pricelist" are taken from the list of tariff plans (/doc/pricelist/id and /doc/pricelist/price/period/@length). The system will return the following XML:
<doc><billorder.id>1234</billorder.id></doc>
  • Order payment: <BILLmanager URL>?authinfo=<name>:<password>&func=basket&id=?&sok=ok. Where "ID" is an identificator that the system received when the order was placed.
  • Redirect to BILLmanager: <BILLmanager URL>?authinfo=<name>:<password>&func=session.newkey&key=? "key" is a random consequence of symbols. The user will be redirected to <BILLmanager URL>?func=auth&username=<name>&key=?&backlevel=?&backname=?&backurl=? where "key" is the sequence from the previous request, "backlevel" is a User level the control panel, "backname" is the panel name, "backurl" is <panel URL>?startform=plugin

Manual order

In some situations, the billing system may not try to order a module automatically, and will go to a partner's web-site. In this case, the request will look like this: "<billing system URL>?module=<module name>&license=<license ID>"