public function getTransactionList($merchantList = null, \DateTime $dStartDate = null, \DateTime $dEndDate = null)
{
$totalTransactions = array();
$dEndDate->add(new \DateInterval('P1D'));
$valuesFormExport = array();
$valuesFormExport[] = new \Oara\Curl\Parameter('pDB', 'UK');
$valuesFormExport[] = new \Oara\Curl\Parameter('content', 'PDF');
$valuesFormExport[] = new \Oara\Curl\Parameter('pDate1', $dStartDate->format("m/j/Y"));
$valuesFormExport[] = new \Oara\Curl\Parameter('pDate2', $dEndDate->format("m/j/Y"));
$urls = array();
$urls[] = new \Oara\Curl\Request('https://www.autoeurope.co.uk/afftools/iatareport_popup.cfm?', $valuesFormExport);
$exportReport = $this->_client->post($urls);
$xmlTransactionList = self::readTransactions($exportReport[0]);
foreach ($xmlTransactionList as $xmlTransaction) {
$transaction = array();
$transaction['merchantId'] = 1;
$date = \DateTime::createFromFormat("m/d/Y", $xmlTransaction['Booked']);
$transaction['date'] = $date->format("Y-m-d 00:00:00");
$transaction['amount'] = \Oara\Utilities::parseDouble((double) $xmlTransaction['commissionValue']);
$transaction['commission'] = \Oara\Utilities::parseDouble((double) $xmlTransaction['commission']);
$transaction['status'] = \Oara\Utilities::STATUS_CONFIRMED;
$transaction['unique_id'] = $xmlTransaction['Res #'];
if (isset($xmlTransaction['Affiliate1']) && isset($xmlTransaction['Affiliate2'])) {
$customId = (string) $xmlTransaction['Affiliate1'] . (string) $xmlTransaction['Affiliate2'];
$transaction['custom_id'] = $customId;
}
$totalTransactions[] = $transaction;
}
return $totalTransactions;
}