Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function dispatch(\Magento\Framework\App\RequestInterface $request)
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'dispatch');
     if (!$pluginInfo) {
         return parent::dispatch($request);
     } else {
         return $this->___callPlugins('dispatch', func_get_args(), $pluginInfo);
     }
 }
Пример #2
0
 public function testCheckAdvancedAcceptingByPaymentMethod()
 {
     $this->initLayoutMock();
     $this->initOrderMock(self::LAST_REAL_ORDER_ID, Order::STATE_NEW);
     $this->initCheckoutSessionMock(self::LAST_REAL_ORDER_ID, true);
     $this->requestMock->expects($this->once())->method('getParam')->with('RESPMSG')->will($this->returnValue('message'));
     $this->blockMock->expects($this->at(0))->method('setData')->with('goto_section', 'paymentMethod')->will($this->returnSelf());
     $this->blockMock->expects($this->at(1))->method('setData')->with('error_msg', __('Your payment has been declined. Please try again.'))->will($this->returnSelf());
     $this->paymentMock->expects($this->once())->method('getMethod')->will($this->returnValue(Config::METHOD_PAYFLOWADVANCED));
     $payflowadvancedReturnUrl = new PayflowadvancedReturnUrl($this->contextMock, $this->checkoutSessionMock, $this->orderFactoryMock, $this->payflowlinkFactoryMock, $this->helperCheckoutMock, $this->loggerMock);
     $payflowadvancedReturnUrl->execute();
 }