/** * Instantiate IPN model and pass IPN request to it * * @return void */ public function execute() { if (!$this->getRequest()->isPost()) { return; } try { $data = $this->getRequest()->getPost(); $this->_ipnFactory->create(array('data' => $data))->processIpnRequest(); } catch (\Exception $e) { $this->_logger->logException($e); } }
/** * Instantiate IPN model and pass IPN request to it * * @return void * @SuppressWarnings(PHPMD.ExitExpression) */ public function execute() { if (!$this->getRequest()->isPost()) { return; } try { $data = $this->getRequest()->getPostValue(); $this->_ipnFactory->create(['data' => $data])->processIpnRequest(); } catch (RemoteServiceUnavailableException $e) { $this->_logger->critical($e); $this->getResponse()->setStatusHeader(503, '1.1', 'Service Unavailable')->sendResponse(); /** @todo eliminate usage of exit statement */ exit; } catch (\Exception $e) { $this->_logger->critical($e); $this->getResponse()->setHttpResponseCode(500); } }
/** * Instantiate IPN model and pass IPN request to it * * @return void */ public function execute() { if (!$this->getRequest()->isPost()) { return; } try { $data = $this->getRequest()->getPost(); $this->_ipnFactory->create(array('data' => $data))->processIpnRequest(); } catch (UnavailableException $e) { $this->_logger->logException($e); $this->getResponse()->setHeader('HTTP/1.1', '503 Service Unavailable')->sendResponse(); /** @todo eliminate usage of exit statement */ exit; } catch (\Exception $e) { $this->_logger->logException($e); $this->getResponse()->setHttpResponseCode(500); } }