5
5
*/
6
6
namespace Magento \Paypal \Controller \Transparent ;
7
7
8
- use Magento \Framework \App \Action \Context ;
9
8
use Magento \Framework \App \Action \HttpPostActionInterface ;
9
+ use Magento \Framework \App \ActionInterface ;
10
10
use Magento \Framework \App \CsrfAwareActionInterface ;
11
11
use Magento \Framework \App \Request \InvalidRequestException ;
12
12
use Magento \Framework \App \RequestInterface ;
19
19
/**
20
20
* Class for redirecting the Paypal response result to Magento controller.
21
21
*/
22
- class Redirect extends \ Magento \ Framework \ App \ Action \Action implements CsrfAwareActionInterface, HttpPostActionInterface
22
+ class Redirect implements ActionInterface, CsrfAwareActionInterface, HttpPostActionInterface
23
23
{
24
+ /**
25
+ * @var RequestInterface
26
+ */
27
+ private $ request ;
28
+
24
29
/**
25
30
* @var LayoutFactory
26
31
*/
@@ -39,22 +44,21 @@ class Redirect extends \Magento\Framework\App\Action\Action implements CsrfAware
39
44
/**
40
45
* Constructor
41
46
*
42
- * @param Context $context
47
+ * @param RequestInterface $request
43
48
* @param LayoutFactory $resultLayoutFactory
44
49
* @param Transparent $transparent
45
50
* @param Logger $logger
46
51
*/
47
52
public function __construct (
48
- Context $ context ,
53
+ RequestInterface $ request ,
49
54
LayoutFactory $ resultLayoutFactory ,
50
55
Transparent $ transparent ,
51
56
Logger $ logger
52
57
) {
58
+ $ this ->request = $ request ;
53
59
$ this ->resultLayoutFactory = $ resultLayoutFactory ;
54
60
$ this ->transparent = $ transparent ;
55
61
$ this ->logger = $ logger ;
56
-
57
- parent ::__construct ($ context );
58
62
}
59
63
60
64
/**
@@ -82,7 +86,7 @@ public function validateForCsrf(RequestInterface $request): ?bool
82
86
*/
83
87
public function execute ()
84
88
{
85
- $ gatewayResponse = (array )$ this ->getRequest () ->getPostValue ();
89
+ $ gatewayResponse = (array )$ this ->request ->getPostValue ();
86
90
$ this ->logger ->debug (
87
91
['PayPal PayflowPro redirect: ' => $ gatewayResponse ],
88
92
$ this ->transparent ->getDebugReplacePrivateDataKeys (),
0 commit comments