1 | <?php declare(strict_types=1); |
||
11 | final class Notification |
||
12 | { |
||
13 | use HasAttributes, HasSignature; |
||
14 | |||
15 | const AUTHORIZED = 'AUTHORIZED'; |
||
16 | const CONFIRMED = 'CONFIRMED'; |
||
17 | const REVERSED = 'REVERSED'; |
||
18 | const REFUNDED = 'REFUNDED'; |
||
19 | const PARTIAL_REFUNDED = 'PARTIAL_REFUNDED'; |
||
20 | const REJECTED = 'REJECTED'; |
||
21 | |||
22 | private $payCard; |
||
23 | |||
24 | public function __construct(array $attributes) |
||
32 | |||
33 | public function __clone() |
||
37 | |||
38 | public static function fromRequest(RequestInterface $request): self |
||
42 | |||
43 | /** |
||
44 | * Throws an exception if token is invalid. |
||
45 | * |
||
46 | * @param string $secret |
||
47 | * |
||
48 | * @throws InvalidToken |
||
49 | */ |
||
50 | public function validate(string $secret) |
||
56 | |||
57 | public function getTerminalKey() |
||
61 | |||
62 | public function getOrderId() |
||
66 | |||
67 | public function isSuccessful():bool |
||
71 | |||
72 | public function getPaymentId() |
||
76 | |||
77 | public function getPaymentCard(): PaymentCard |
||
89 | |||
90 | public function getErrorCode() |
||
94 | |||
95 | public function getAmount() |
||
99 | |||
100 | public function getRebillId() |
||
104 | |||
105 | public function getData() |
||
109 | |||
110 | public function getStatus() |
||
114 | |||
115 | public function getToken() |
||
119 | |||
120 | public function isAuthorized(): bool |
||
124 | |||
125 | public function isConfirmed(): bool |
||
129 | |||
130 | public function isReversed(): bool |
||
134 | |||
135 | public function isRefunded(): bool |
||
139 | |||
140 | public function isPartialRefunded(): bool |
||
144 | |||
145 | public function isRejected(): bool |
||
149 | } |
||
150 |