Skip to content

Commit 6d6af36

Browse files
committed
MC-31573: PayflowPro Checkout Broken with SameSite Cookie Changes from Chrome 80
1 parent b960214 commit 6d6af36

File tree

1 file changed

+23
-3
lines changed
  • app/code/Magento/Paypal/Controller/Adminhtml/Transparent

1 file changed

+23
-3
lines changed

app/code/Magento/Paypal/Controller/Adminhtml/Transparent/Redirect.php

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@
77

88
use Magento\Backend\App\AbstractAction;
99
use Magento\Backend\App\Action\Context;
10+
use Magento\Framework\App\Action\HttpPostActionInterface;
11+
use Magento\Framework\App\CsrfAwareActionInterface;
12+
use Magento\Framework\App\Request\InvalidRequestException;
13+
use Magento\Framework\App\RequestInterface;
1014
use Magento\Framework\View\Result\LayoutFactory;
1115
use Magento\Payment\Model\Method\Logger;
1216
use Magento\Paypal\Model\Payflow\Transparent;
1317

1418
/**
1519
* Class for redirecting the Paypal response result to Magento controller.
1620
*/
17-
class Redirect extends AbstractAction
21+
class Redirect extends AbstractAction implements HttpPostActionInterface, CsrfAwareActionInterface
1822
{
1923
/**
2024
* @var LayoutFactory
@@ -42,8 +46,7 @@ public function __construct(
4246
LayoutFactory $resultLayoutFactory,
4347
Transparent $transparent,
4448
Logger $logger
45-
)
46-
{
49+
) {
4750
parent::__construct($context);
4851
$this->transparent = $transparent;
4952
$this->logger = $logger;
@@ -68,4 +71,21 @@ public function execute()
6871

6972
return $resultLayout;
7073
}
74+
75+
/**
76+
* @inheritdoc
77+
*/
78+
public function createCsrfValidationException(
79+
RequestInterface $request
80+
): ?InvalidRequestException {
81+
return null;
82+
}
83+
84+
/**
85+
* @inheritdoc
86+
*/
87+
public function validateForCsrf(RequestInterface $request): ?bool
88+
{
89+
return true;
90+
}
7191
}

0 commit comments

Comments
 (0)