Skip to content

Commit 8ed20d1

Browse files
committed
MC-31573: PayflowPro Checkout Broken with SameSite Cookie Changes from Chrome 80
1 parent abdb458 commit 8ed20d1

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
*/
66
namespace Magento\Paypal\Controller\Transparent;
77

8-
use Magento\Framework\App\Action\Context;
98
use Magento\Framework\App\Action\HttpPostActionInterface;
9+
use Magento\Framework\App\ActionInterface;
1010
use Magento\Framework\App\CsrfAwareActionInterface;
1111
use Magento\Framework\App\Request\InvalidRequestException;
1212
use Magento\Framework\App\RequestInterface;
@@ -19,8 +19,13 @@
1919
/**
2020
* Class for redirecting the Paypal response result to Magento controller.
2121
*/
22-
class Redirect extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface, HttpPostActionInterface
22+
class Redirect implements ActionInterface, CsrfAwareActionInterface, HttpPostActionInterface
2323
{
24+
/**
25+
* @var RequestInterface
26+
*/
27+
private $request;
28+
2429
/**
2530
* @var LayoutFactory
2631
*/
@@ -39,22 +44,21 @@ class Redirect extends \Magento\Framework\App\Action\Action implements CsrfAware
3944
/**
4045
* Constructor
4146
*
42-
* @param Context $context
47+
* @param RequestInterface $request
4348
* @param LayoutFactory $resultLayoutFactory
4449
* @param Transparent $transparent
4550
* @param Logger $logger
4651
*/
4752
public function __construct(
48-
Context $context,
53+
RequestInterface $request,
4954
LayoutFactory $resultLayoutFactory,
5055
Transparent $transparent,
5156
Logger $logger
5257
) {
58+
$this->request = $request;
5359
$this->resultLayoutFactory = $resultLayoutFactory;
5460
$this->transparent = $transparent;
5561
$this->logger = $logger;
56-
57-
parent::__construct($context);
5862
}
5963

6064
/**
@@ -82,7 +86,7 @@ public function validateForCsrf(RequestInterface $request): ?bool
8286
*/
8387
public function execute()
8488
{
85-
$gatewayResponse = (array)$this->getRequest()->getPostValue();
89+
$gatewayResponse = (array)$this->request->getPostValue();
8690
$this->logger->debug(
8791
['PayPal PayflowPro redirect:' => $gatewayResponse],
8892
$this->transparent->getDebugReplacePrivateDataKeys(),

0 commit comments

Comments
 (0)