private function __getTransaction($transId) { $ewayConfig = new Eway_Rapid31_Model_Config(); $url = 'https://api.sandbox.ewaypayments.com/Transaction/' . $transId; $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); curl_setopt($ch, CURLOPT_USERPWD, $ewayConfig->getBasicAuthenticationHeader()); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $ewayConfig->isEnableSSLVerification()); $result = curl_exec($ch); return $result; }
protected function _log($message, $file = self::DEBUG_FILE) { if ($this->_config->isDebug()) { Mage::log($message, Zend_Log::DEBUG, $file, true); } }