1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* |
6
|
|
|
* This file is part of the Extension "sf_event_mgt" for TYPO3 CMS. |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please read the |
9
|
|
|
* LICENSE.txt file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace DERHANSEN\SfEventMgt\Event; |
13
|
|
|
|
14
|
|
|
use DERHANSEN\SfEventMgt\Controller\PaymentController; |
15
|
|
|
use DERHANSEN\SfEventMgt\Domain\Model\Registration; |
16
|
|
|
use Psr\Http\Message\ServerRequestInterface; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* This event is triggered before the payment notify view is rendered. This event must be used to handle feedback |
20
|
|
|
* from the payment provider when the notification action is triggered (e.g. payment denied afterwards) |
21
|
|
|
*/ |
22
|
|
|
final class ProcessPaymentNotifyEvent |
23
|
|
|
{ |
24
|
|
|
public function __construct( |
25
|
|
|
private array $variables, |
26
|
|
|
private readonly string $paymentMethod, |
27
|
|
|
private bool $updateRegistration, |
28
|
|
|
private readonly Registration $registration, |
29
|
|
|
private readonly array $getVariables, |
30
|
|
|
private readonly PaymentController $paymentController, |
31
|
|
|
private readonly ServerRequestInterface $request |
32
|
|
|
) { |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
public function getVariables(): array |
36
|
|
|
{ |
37
|
|
|
return $this->variables; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function getPaymentMethod(): string |
41
|
|
|
{ |
42
|
|
|
return $this->paymentMethod; |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
public function getUpdateRegistration(): bool |
46
|
|
|
{ |
47
|
|
|
return $this->updateRegistration; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
public function getRegistration(): Registration |
51
|
|
|
{ |
52
|
|
|
return $this->registration; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function getGetVariables(): array |
56
|
|
|
{ |
57
|
|
|
return $this->getVariables; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
public function getPaymentController(): PaymentController |
61
|
|
|
{ |
62
|
|
|
return $this->paymentController; |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
public function setVariables(array $variables): void |
66
|
|
|
{ |
67
|
|
|
$this->variables = $variables; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
public function setUpdateRegistration(bool $updateRegistration): void |
71
|
|
|
{ |
72
|
|
|
$this->updateRegistration = $updateRegistration; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function getRequest(): ServerRequestInterface |
76
|
|
|
{ |
77
|
|
|
return $this->request; |
78
|
|
|
} |
79
|
|
|
} |
80
|
|
|
|