public function fetch($query, $ids) { $criteria = array(); foreach ($query as $term) { $criteria[$term->name] = $term->toparam(); } $criteria["ids"] = TransactionSearch::ids()->in($ids)->toparam(); $path = $this->_config->merchantPath() . '/transactions/advanced_search'; $response = $this->_http->post($path, array('search' => $criteria)); return Util::extractattributeasarray($response['creditCardTransactions'], 'transaction'); }
public function fetch($query, $ids) { $criteria = []; foreach ($query as $term) { $criteria[$term->name] = $term->toparam(); } $criteria["ids"] = TransactionSearch::ids()->in($ids)->toparam(); $path = $this->_config->merchantPath() . '/transactions/advanced_search'; $response = $this->_http->post($path, ['search' => $criteria]); if (array_key_exists('creditCardTransactions', $response)) { return Util::extractattributeasarray($response['creditCardTransactions'], 'transaction'); } else { throw new Exception\DownForMaintenance(); } }