public function forwardToHost(array $configHost, Payone_Core_Model_Domain_Protocol_TransactionStatus $transactionStatus) { $url = ''; $response = ''; try { if (!array_key_exists('url', $configHost)) { throw new Payone_Core_Exception_TransactionStatusForward('Missing Url'); } $url = $configHost['url']; $timeout = self::DEFAULT_TIMEOUT; if (array_key_exists('timeout', $configHost)) { $timeout = $configHost['timeout']; } $parameters = $transactionStatus->toArray($this->allowedKeys); $configClient = array('timeout' => $timeout); $httpClient = $this->getHttpClient(); $httpClient->setUri($url); $httpClient->setConfig($configClient); $httpClient->setMethod(Varien_Http_Client::POST); $httpClient->setParameterPost($parameters); $response = $httpClient->request(); if ($response !== 'TSOK') { throw new Payone_Core_Exception_TransactionStatusForward($response); } } catch (Exception $e) { $this->addForwardException($url, $e); } return $response; }