In order to direct extension users to the online store that sells licenses for this extension, the link to the online store is placed on the screens of the extension. For an example, see the “License required” messages in section “Available Licensing Models”. Resellers or Service providers may choose to manipulate this link depending on how they wish to sell licenses to their customers (see the Administrator’s Guide section “Reselling extensions” for information). Therefore, it is important know how to correctly provide and obtain the online store URL that is actual for this specific Plesk installation.

  1. Do not hardcode the specific online store URL into the extension GUI.
  2. Use the buy_url property in the meta.xml file to provide the online store URL. For example, extensions sold through Plesk Online Store have in their meta.xml files the following entry: <buy_url></buy_url>
  3. Use the appropriate SDK methods to retrieve this URL.

Obtaining License Purchase URL

Use the pm_Context::getBuyUrl() method to get the actual online store URL.

Plesk will generate a URL similar to this:

Obtaining License Upgrade URL

When implementing Multiple Offers licensing, you will need to provide a user with directions to where they can upgrade their license, if they need. Use the pm_Context::getUpgradeLicenseUrl() method to obtain the actual URL for upgrading the current extension’s license.

Plesk will generate a URL similar to this:

The time when to present the user with the invitation to upgrade the license is up to the developer. Usually, it is done when one or several of the corresponding resource limits are either depleted or nearing depletion.