コード例 #1
0
ファイル: Index.php プロジェクト: Atlis/docker-magento2
 /**
  * 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);
     }
 }
コード例 #2
0
ファイル: Index.php プロジェクト: kidaa30/magento2-platformsh
 /**
  * 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);
     }
 }
コード例 #3
0
ファイル: Index.php プロジェクト: aiesh/magento2
 /**
  * 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);
     }
 }