Example #1
0
 public function getTransactionHistory(Account $account, Filter $filter)
 {
     $response = $this->client->getTransactionHistory(["account" => $this->convertAccountToSoapVar($account), "filter" => $this->convertFilterToSoapVar($filter), "pgInfo" => '', "allPages" => true]);
     if (isset($response->return->TrnHistoryElements)) {
         if (!is_array($response->return->TrnHistoryElements)) {
             $transactions = array($response->return->TrnHistoryElements);
         } else {
             $transactions = $response->return->TrnHistoryElements;
         }
         return array_map(function ($trn) {
             return new Transaction($trn);
         }, $transactions);
     } else {
         return array();
     }
 }