Skip to content

Commit 8bfbea0

Browse files
committed
MC-41780: Paypal API improvements
1 parent 7b03070 commit 8bfbea0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ public function execute(): ResultInterface
126126
$quote = $this->_getQuote();
127127
}
128128

129+
if ($customerId != null && ($quote->getCustomerIsGuest() || $customerId !== $quote->getCustomerId())) {
130+
throw new LocalizedException(__('Sorry, but something went wrong.'));
131+
}
132+
129133
$responseContent = [
130134
'success' => true,
131135
'error_message' => '',

app/code/Magento/Paypal/etc/csp_whitelist.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,10 @@
3737
<value id="www_pilot_payflowlink_paypal" type="host">pilot-payflowlink.paypal.com</value>
3838
</values>
3939
</policy>
40+
<policy id="connect-src">
41+
<values>
42+
<value id="www_sandbox_paypal_com" type="host">www.sandbox.paypal.com</value>
43+
</values>
44+
</policy>
4045
</policies>
4146
</csp_whitelist>

0 commit comments

Comments
 (0)