A TradeTracker API client to communicate with the webservice and map results to real model objects.
You can install the package via composer:
$ composer require hypeit/tradetracker-api-client
You must configure authentication in order to use the client.
$authentication = new Authentication(
12345, // The customer id
'passphrase', // The passphrase
true, // Whether to not allow changes (optional)
'en_GB', // The locale to be used for results. (optional)
false // Whether to receive demo results. (optional)
);
Then inject the wsdl and the authentication object into the client.
$client = new TradeTrackerClient('http://ws.tradetracker.com/soap/affiliate?wsdl', $authenticate);
Call a client method to initiate the api call:
$affiliateSites = $client->getAffiliateSites();
Common methods are:
- getAffiliateSites
- getCampaigns
- getClickTransactions
- getConversionTransactions
- getTransactions
- getReportAffiliateSite
- getReportCampaign
- getFeeds
- getFeedProductCategories
- getFeedProducts
Some method calls can have an optional filter:
$filter = new AffiliateSiteFilter();
$filter->setLimit(5);
$affiliateSites = $client->getAffiliateSites($filter);
$ composer test
The MIT License (MIT). Please see License File for more information.