Skip to content

Commit d9a3cf5

Browse files
committed
MAGETWO-92953: [2.3] Once Payflow Pro payment is Declined, customer cannot continue checkout
- allow POST request without form key on response controller
1 parent 5a7a5e1 commit d9a3cf5

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

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

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

8+
use Magento\Framework\App\CsrfAwareActionInterface;
89
use Magento\Framework\Registry;
910
use Magento\Framework\App\Action\Context;
1011
use Magento\Framework\View\Result\LayoutFactory;
@@ -16,11 +17,13 @@
1617
use Magento\Paypal\Model\Payflow\Transparent;
1718
use Magento\Sales\Api\PaymentFailuresInterface;
1819
use Magento\Framework\Session\Generic as Session;
20+
use Magento\Framework\App\RequestInterface;
21+
use Magento\Framework\App\Request\InvalidRequestException;
1922

2023
/**
2124
* Class Response
2225
*/
23-
class Response extends \Magento\Framework\App\Action\Action
26+
class Response extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface
2427
{
2528
/**
2629
* Core registry
@@ -91,6 +94,23 @@ public function __construct(
9194
$this->paymentFailures = $paymentFailures ?: $this->_objectManager->get(PaymentFailuresInterface::class);
9295
}
9396

97+
/**
98+
* @inheritDoc
99+
*/
100+
public function createCsrfValidationException(
101+
RequestInterface $request
102+
): ?InvalidRequestException {
103+
return null;
104+
}
105+
106+
/**
107+
* @inheritDoc
108+
*/
109+
public function validateForCsrf(RequestInterface $request): ?bool
110+
{
111+
return true;
112+
}
113+
94114
/**
95115
* @return ResultInterface
96116
*/

0 commit comments

Comments
 (0)