/** * Cancel order, return quote to customer * * @param string $errorMsg * @return false|string */ protected function _cancelPayment($errorMsg = '') { $gotoSection = false; $this->_checkoutHelper->cancelCurrentOrder($errorMsg); if ($this->_checkoutSession->restoreQuote()) { //Redirect to payment step $gotoSection = 'paymentMethod'; } return $gotoSection; }
/** * Cancel order, return quote to customer * * @param string $errorMsg * @return false|string */ protected function _cancelPayment($errorMsg = '') { $gotoSection = false; $helper = $this->_objectManager->get('Magento\\Paypal\\Helper\\Checkout'); $helper->cancelCurrentOrder($errorMsg); if ($this->_session->restoreQuote()) { $gotoSection = 'paymentMethod'; } return $gotoSection; }
/** * Restores quote * * @return bool */ public function restoreQuote() { return $this->session->restoreQuote(); }