示例#1
0
 /**
  * Processes update requests from payment service providers.
  */
 public function updateAction()
 {
     try {
         $context = $this->getContext();
         $templatePaths = Base::getAimeos()->getCustomPaths('client/html');
         $client = \Client_Html_Checkout_Update_Factory::createClient($context, $templatePaths);
         $view = $context->getView();
         $param = array_merge(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET(), \TYPO3\CMS\Core\Utility\GeneralUtility::_POST());
         $helper = new \MW_View_Helper_Parameter_Default($view, $param);
         $view->addHelper('param', $helper);
         $client->setView($view);
         $client->process();
         $this->response->addAdditionalHeaderData($client->getHeader());
         return $client->getBody();
     } catch (Exception $e) {
         @header('HTTP/1.1 500 Internal server error', true, 500);
         return 'Error: ' . $e->getMessage();
     }
 }
示例#2
0
 public function testCreateClientNameNotFound()
 {
     $this->setExpectedException('Client_Html_Exception');
     Client_Html_Checkout_Update_Factory::createClient($this->_context, $this->_templatePaths, 'notfound');
 }