_getValidator()) { Mage::register('current_centinel_validator', $validator); } $this->loadLayout()->renderLayout(); } /** * Process autentication complete action * */ public function authenticationCompleteAction() { try { if ($validator = $this->_getValidator()) { $request = $this->getRequest(); $data = new Varien_Object(); $data->setTransactionId($request->getParam('MD')); $data->setPaResPayload($request->getParam('PaRes')); $validator->authenticate($data); Mage::register('current_centinel_validator', $validator); } } catch (Exception $e) { Mage::register('current_centinel_validator', false); } $this->loadLayout()->renderLayout(); } /** * Return payment model * * @return Mage_Sales_Model_Quote_Payment */ private function _getPayment() { return Mage::getSingleton('checkout/session')->getQuote()->getPayment(); } /** * Return Centinel validation model * * @return Mage_Centinel_Model_Service */ private function _getValidator() { if ($this->_getPayment()->getMethodInstance()->getIsCentinelValidationEnabled()) { return $this->_getPayment()->getMethodInstance()->getCentinelValidator(); } return false; } }