forked from stixx/tradetracker-api-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
30 lines (24 loc) · 852 Bytes
/
index.php
File metadata and controls
30 lines (24 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
use Hypeit\TradeTracker\Client\TradeTrackerClient;
use Hypeit\TradeTracker\Filter\AffiliateSiteFilter;
use Hypeit\TradeTracker\Model\Authenticate;
require_once __DIR__ . '/../vendor/autoload.php';
// Setup credentials
$authenticate = new Authenticate(
12345, // The customer id
'passphrase', // The passphrase
true, // Whether to not allow changes
'nl_NL', // The locale to be used for results.
false // Whether to receive demo results.
);
// Initialize filter (optional)
$filter = new AffiliateSiteFilter();
$filter->setLimit(5);
try {
// Create the api client
$client = new TradeTrackerClient('http://ws.tradetracker.com/soap/affiliate?wsdl', $authenticate);
// Initiate the call
$affiliateSites = $client->getAffiliateSites($filter);
} catch (\Exception $exception) {
// Do something...
}