PHP code example of ooglek / shareasale-merchant-api-sdk
1. Go to this page and download the library: Download ooglek/shareasale-merchant-api-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ooglek / shareasale-merchant-api-sdk example snippets
$sas = new ooglek\ShareASale\Client(
'12345', // MerchantId
'rAnDoMsTuFf', // Token
'sUpErRaNd0mStUfF' // Secret Key
);
// Returns an array with the Summary of your Merchant account Activity
$records = $sas->activitySummary(
[
'datestart' => '15/09/2021',
'dateend' => '15/08/2021'
]
);
$sas->setVersion('3.0');
$sas->getHttpResponse();
$sas->void(['date' => '15/09/2021', 'ordernumber' => 12345]);
$sas->balance();
$sas->todayataglance();