/** * Add fraud context information to the order create request. * @param Mage_Sales_Model_Order * @param IOrderContext */ public function addContextInfoToPayload(IOrderContext $orderContext) { $sessionInfo = new Varien_Object($this->_helper->getSessionInfo()); $orderContext->setHostname($this->_httpHelper->getRemoteHost())->setIpAddress($this->_httpHelper->getRemoteAddr())->setUserAgent($this->_httpHelper->getHttpUserAgent())->setConnection($this->_httpHelper->getHttpConnection())->setCookies($this->_httpHelper->getCookiesString())->setJavascriptData($this->_httpHelper->getJavaScriptFraudData())->setContentTypes($this->_httpHelper->getHttpAccept())->setEncoding($this->_httpHelper->getHttpAcceptEncoding())->setLanguage($this->_httpHelper->getHttpAcceptLanguage())->setCharSet($this->_httpHelper->getHttpAcceptCharset())->setTdlOrderTimestamp(new DateTime())->setSessionId($sessionInfo->getEncryptedSessionId())->setReferrer($sessionInfo->getOrderSource())->setTimeOnFile($sessionInfo->getTimeOnFile())->setRtcTransactionResponseCode($sessionInfo->getRtcTransactionResponseCode())->setRtcReasonCode($sessionInfo->getRtcReasonCode())->setAuthorizationAttempts($sessionInfo->getAuthorizationAttempts()); $this->_setTimeData($sessionInfo, $orderContext); return $this; }