File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
app/code/Magento/Paypal/Controller/Express Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,24 @@ public function execute(): ResultInterface
168
168
return $ controllerResult ->setData ($ responseContent );
169
169
}
170
170
171
+ /**
172
+ * Prepare quote specified for checkout.
173
+ *
174
+ * @return \Magento\Quote\Api\Data\CartInterface
175
+ * @throws LocalizedException
176
+ */
177
+ private function prepareQuote ()
178
+ {
179
+ $ quoteId = $ this ->getRequest ()->getParam ('quote_id ' );
180
+ if ($ quoteId ) {
181
+ $ quote = $ this ->userContext ->getUserId ()
182
+ ? $ this ->cartRepository ->get ($ quoteId )
183
+ : $ this ->guestCartRepository ->get ($ quoteId );
184
+ } else {
185
+ $ quote = $ this ->_getQuote ();
186
+ }
187
+ return $ quote ;
188
+ }
171
189
/**
172
190
* Get paypal token
173
191
*
@@ -176,7 +194,7 @@ public function execute(): ResultInterface
176
194
*/
177
195
private function getToken (): ?string
178
196
{
179
- $ quote = $ this ->_getQuote ();
197
+ $ quote = $ this ->prepareQuote ();
180
198
$ this ->_initCheckout ($ quote );
181
199
182
200
if ($ quote ->getIsMultiShipping ()) {
You can’t perform that action at this time.
0 commit comments