diff --git a/vendor/magento/module-paypal/Controller/Express/AbstractExpress/Cancel.php b/vendor/magento/module-paypal/Controller/Express/AbstractExpress/Cancel.php index c469338d039..375a2639ab0 100644 --- a/vendor/magento/module-paypal/Controller/Express/AbstractExpress/Cancel.php +++ b/vendor/magento/module-paypal/Controller/Express/AbstractExpress/Cancel.php @@ -31,6 +31,7 @@ class Cancel extends \Magento\Paypal\Controller\Express\AbstractExpress ->unsLastSuccessQuoteId() ->unsLastOrderId() ->unsLastRealOrderId(); + $this->_getSession()->unsQuoteId(); // clean quote from session that was set in OnAuthorization $this->messageManager->addSuccessMessage( __('Express Checkout and Order have been canceled.') ); diff --git a/vendor/magento/module-paypal/Controller/Express/AbstractExpress/PlaceOrder.php b/vendor/magento/module-paypal/Controller/Express/AbstractExpress/PlaceOrder.php index 055af4162d5..29d4a5bd1f2 100644 --- a/vendor/magento/module-paypal/Controller/Express/AbstractExpress/PlaceOrder.php +++ b/vendor/magento/module-paypal/Controller/Express/AbstractExpress/PlaceOrder.php @@ -11,7 +11,7 @@ use Magento\Framework\Exception\LocalizedException; use Magento\Paypal\Model\Api\ProcessableException as ApiProcessableException; /** - * Class PlaceOrder + * Creates order on backend and prepares session to show appropriate next step in flow * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class PlaceOrder extends \Magento\Paypal\Controller\Express\AbstractExpress @@ -127,6 +127,7 @@ class PlaceOrder extends \Magento\Paypal\Controller\Express\AbstractExpress return; } $this->_initToken(false); // no need in token anymore + $this->_getSession()->unsQuoteId(); // clean quote from session that was set in OnAuthorization $this->_redirect('checkout/onepage/success'); return; } catch (ApiProcessableException $e) {