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(
114
114
public function execute (): ResultInterface
115
115
{
116
116
$ controllerResult = $ this ->resultFactory ->create (ResultFactory::TYPE_JSON );
117
- $ quoteId = (int )$ this ->getRequest ()->getParam ('quoteId ' );
118
117
$ payerId = $ this ->getRequest ()->getParam ('payerId ' );
119
118
$ tokenId = $ this ->getRequest ()->getParam ('paymentToken ' );
120
- $ customerId = (int )$ this ->getRequest ()->getParam ('customerId ' ) ?: $ this ->_customerSession ->getId ();
121
119
122
120
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 ();
132
122
133
123
$ responseContent = [
134
124
'success ' => true ,
You can’t perform that action at this time.
0 commit comments