File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
app/code/Magento/Paypal/Controller/Express Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -114,21 +114,11 @@ public function __construct(
114114 public function execute (): ResultInterface
115115 {
116116 $ controllerResult = $ this ->resultFactory ->create (ResultFactory::TYPE_JSON );
117- $ quoteId = (int )$ this ->getRequest ()->getParam ('quoteId ' );
118117 $ payerId = $ this ->getRequest ()->getParam ('payerId ' );
119118 $ tokenId = $ this ->getRequest ()->getParam ('paymentToken ' );
120- $ customerId = (int )$ this ->getRequest ()->getParam ('customerId ' ) ?: $ this ->_customerSession ->getId ();
121119
122120 try {
123- if ($ quoteId ) {
124- $ quote = $ customerId ? $ this ->cartRepository ->get ($ quoteId ) : $ this ->guestCartRepository ->get ($ quoteId );
125- } else {
126- $ quote = $ this ->_getQuote ();
127- }
128-
129- if ($ customerId != null && ($ quote ->getCustomerIsGuest () || $ customerId !== $ quote ->getCustomerId ())) {
130- throw new LocalizedException (__ ('Sorry, but something went wrong. ' ));
131- }
121+ $ quote = $ this ->_getQuote ();
132122
133123 $ responseContent = [
134124 'success ' => true ,
You can’t perform that action at this time.
0 commit comments