File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed
app/code/Magento/Paypal/Controller/Adminhtml/Transparent Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change 7
7
8
8
use Magento \Backend \App \AbstractAction ;
9
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 ;
10
14
use Magento \Framework \View \Result \LayoutFactory ;
11
15
use Magento \Payment \Model \Method \Logger ;
12
16
use Magento \Paypal \Model \Payflow \Transparent ;
13
17
14
18
/**
15
19
* Class for redirecting the Paypal response result to Magento controller.
16
20
*/
17
- class Redirect extends AbstractAction
21
+ class Redirect extends AbstractAction implements HttpPostActionInterface, CsrfAwareActionInterface
18
22
{
19
23
/**
20
24
* @var LayoutFactory
@@ -42,8 +46,7 @@ public function __construct(
42
46
LayoutFactory $ resultLayoutFactory ,
43
47
Transparent $ transparent ,
44
48
Logger $ logger
45
- )
46
- {
49
+ ) {
47
50
parent ::__construct ($ context );
48
51
$ this ->transparent = $ transparent ;
49
52
$ this ->logger = $ logger ;
@@ -68,4 +71,21 @@ public function execute()
68
71
69
72
return $ resultLayout ;
70
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
+ }
71
91
}
You can’t perform that action at this time.
0 commit comments