Skip to content

Commit 6e14cf0

Browse files
committed
MC-41780: Paypal API improvements
1 parent 96d042a commit 6e14cf0

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

app/code/Magento/Paypal/Controller/Express/OnAuthorization.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)