Getting started example

We'll make a short example of making a simple request that will retrieve a list of affiliates. You will get more detailed documentation about the classes and methods in the documentation for each class. To start using the API, you have to include file PapApi.class.php into your PHP code. This file contains all the necessary classes. You can download the PapApi.class.php file from the merchant panel: Tools > Integration > API Integration > Download PAP API include 'PapApi....

How to Update API file

This example shows how to check version of API file and how to update it. In return command of first function write right url of your PAP. <?php //base url of your pap function getPapUrl() { return 'https://www.yoursite.com/affiliate/'; } //name of api file (with path if it is not in the same directory as this script) function getApiFilename() { return 'PapApi.class.php'; } function getVersionFromPap() { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, getPapUrl().'api/version.php'); c...
×