public function getTransactionList($merchantList = null, \DateTime $dStartDate = null, \DateTime $dEndDate = null)
{
$totalTransactions = array();
$publicapikey = $this->_publicapikey;
$privateapikey = $this->_privateapikey;
$date = new \DateTime();
$timestamp = $date->getTimestamp();
$authtoken = md5($timestamp . $privateapikey);
if (\count($this->_sitesAllowed) == 0) {
$valuesFromExport = array(new \Oara\Curl\Parameter('version', '0.5'), new \Oara\Curl\Parameter('timestamp', $timestamp), new \Oara\Curl\Parameter('apikey', $publicapikey), new \Oara\Curl\Parameter('authtoken', $authtoken), new \Oara\Curl\Parameter('startDate', $dStartDate->format("Y-m-d")), new \Oara\Curl\Parameter('endDate', $dEndDate->format("Y-m-d")), new \Oara\Curl\Parameter('format', 'json'));
$totalTransactions = $this->processTransactions($valuesFromExport);
} else {
foreach ($this->_sitesAllowed as $site) {
$valuesFromExport = array(new \Oara\Curl\Parameter('version', '0.5'), new \Oara\Curl\Parameter('timestamp', $timestamp), new \Oara\Curl\Parameter('apikey', $publicapikey), new \Oara\Curl\Parameter('authtoken', $authtoken), new \Oara\Curl\Parameter('startDate', $dStartDate->format("Y-m-d")), new \Oara\Curl\Parameter('endDate', $dEndDate->format("Y-m-d")), new \Oara\Curl\Parameter('format', 'json'), new \Oara\Curl\Parameter('domainID', $site));
$totalTransactions = $this->processTransactions($valuesFromExport);
}
}
return $totalTransactions;
}