Skip to content

Commit 45b9e19

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

File tree

1 file changed

+1
-79
lines changed
  • app/code/Magento/Paypal/Controller/Adminhtml/Transparent

1 file changed

+1
-79
lines changed

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

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,9 @@
55
*/
66
namespace Magento\Paypal\Controller\Adminhtml\Transparent;
77

8-
use Magento\Backend\App\AbstractAction;
9-
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;
14-
use Magento\Framework\View\Result\LayoutFactory;
15-
use Magento\Payment\Model\Method\Logger;
16-
use Magento\Paypal\Model\Payflow\Transparent;
17-
188
/**
199
* Class for redirecting the Paypal response result to Magento controller.
2010
*/
21-
class Redirect extends AbstractAction implements HttpPostActionInterface, CsrfAwareActionInterface
11+
class Redirect extends \Magento\Paypal\Controller\Transparent\Redirect
2212
{
23-
/**
24-
* @var LayoutFactory
25-
*/
26-
private $resultLayoutFactory;
27-
28-
/**
29-
* @var Transparent
30-
*/
31-
private $transparent;
32-
33-
/**
34-
* @var Logger
35-
*/
36-
private $logger;
37-
38-
/**
39-
* @param Context $context
40-
* @param LayoutFactory $resultLayoutFactory
41-
* @param Transparent $transparent
42-
* @param Logger $logger
43-
*/
44-
public function __construct(
45-
Context $context,
46-
LayoutFactory $resultLayoutFactory,
47-
Transparent $transparent,
48-
Logger $logger
49-
) {
50-
parent::__construct($context);
51-
$this->transparent = $transparent;
52-
$this->logger = $logger;
53-
$this->resultLayoutFactory = $resultLayoutFactory;
54-
}
55-
56-
/**
57-
* @inheritdoc
58-
*/
59-
public function execute()
60-
{
61-
$gatewayResponse = (array)$this->getRequest()->getPostValue();
62-
$this->logger->debug(
63-
['PayPal PayflowPro redirect:' => $gatewayResponse],
64-
$this->transparent->getDebugReplacePrivateDataKeys(),
65-
$this->transparent->getDebugFlag()
66-
);
67-
68-
$resultLayout = $this->resultLayoutFactory->create();
69-
$resultLayout->addDefaultHandle();
70-
$resultLayout->getLayout()->getUpdate()->load(['transparent_payment_redirect']);
71-
72-
return $resultLayout;
73-
}
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-
}
9113
}

0 commit comments

Comments
 (0)