Commerce License Key API (*) > Invisionize.eu - IP.Board (IPB) News
Kanał Rss Kanał Rss
Kanał Atom Kanał Atom

Commerce License Key API (*)

wersja drukowalna wersja Microsoft Word wersja HTML

Products in commerce can generate license keys. A simple HTTP-based API is available to interact with license keys.

 

Basics

For each of the endpoints, you will send a HTTP POST request, and a JSON object will be returned. The URL you will be posting to is:

http://www.example.com/applications/nexus/interface/licenses/?ENDPOINT

Of course, replace "example.com" with the correct domain for your community and "?ENDPOINT" with one of the endpoints listed below.

 

Configuration

Before you can use the API, you must define some settings. In the root directory of your community, create a constants.php file if you don't already have one (be sure to start the file with <?php) and add this line:

define('NEXUS_LKEY_API_DISABLE', FALSE);

You can also add two other constants:

 

Important Information

Two concepts you need to understand before you can dive in:

 

Endpoint: activate

Call this to activate a license key, for example when a user first enters their key into your application.

Parameters to send:

Response:

Error codes in addition to those common to all endpoints:

 

Endpoint: check

Call this to check a license key is still active. Must be from the same IP address that activate was unless overridden by configuration.

Parameters to send:

Response:

 

Error codes in addition to those common to all endpoints:

 

Endpoint: info

Call this to get information about a key, not specific to any usage ID.

Parameters to send:

Response:

There are no error codes in addition to those common to all endpoints.

 

Endpoint: updateExtra

Call this to update the "extra" information for a key that was originally sent in the "activate" request. Must be from the same IP address that activate was unless overridden by configuration.

Parameters to send:

Response:

Error codes in addition to those common to all endpoints:

czw, 01 wrzesień 2016