File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
app/code/Magento/Paypal/Controller/Express Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2015 Adobe
4+ * All Rights Reserved .
55 */
66namespace Magento \Paypal \Controller \Express ;
77
@@ -151,6 +151,9 @@ public function __construct(
151151 protected function _initCheckout (?CartInterface $ quoteObject = null )
152152 {
153153 $ quote = $ quoteObject ? $ quoteObject : $ this ->_getQuote ();
154+ if ($ quote ->getId ()) {
155+ $ this ->_getCheckoutSession ()->setPayPalQuoteId ($ quote ->getId ());
156+ }
154157 if (!$ quote ->hasItems () || $ quote ->getHasError ()) {
155158 $ this ->getResponse ()->setStatusHeader (403 , '1.1 ' , 'Forbidden ' );
156159 throw new \Magento \Framework \Exception \LocalizedException (__ ('We can \'t initialize Express Checkout. ' ));
@@ -248,6 +251,9 @@ protected function _getQuote()
248251 $ this ->_getCheckoutSession ()->replaceQuote ($ this ->_quote );
249252 } else {
250253 $ this ->_quote = $ this ->_getCheckoutSession ()->getQuote ();
254+ if (!$ this ->_quote ->getId () && $ this ->_getCheckoutSession ()->getPayPalQuoteId ()) {
255+ $ this ->_quote = $ this ->quoteRepository ->get ($ this ->_getCheckoutSession ()->getPayPalQuoteId ());
256+ }
251257 }
252258 }
253259 return $ this ->_quote ;
You can’t perform that action at this time.
0 commit comments