1
|
|
|
<?php declare(strict_types = 1); |
2
|
|
|
|
3
|
|
|
namespace SlevomatCsobGateway\Call\Masterpass; |
4
|
|
|
|
5
|
|
|
use DateTimeImmutable; |
6
|
|
|
use SlevomatCsobGateway\Call\PaymentStatus; |
7
|
|
|
use SlevomatCsobGateway\Call\ResultCode; |
8
|
|
|
|
9
|
|
|
class ExtractResponse |
10
|
|
|
{ |
11
|
|
|
|
12
|
|
|
/** @var string */ |
13
|
|
|
private $payId; |
14
|
|
|
|
15
|
|
|
/** @var DateTimeImmutable */ |
16
|
|
|
private $responseDateTime; |
17
|
|
|
|
18
|
|
|
/** @var ResultCode */ |
19
|
|
|
private $resultCode; |
20
|
|
|
|
21
|
|
|
/** @var string */ |
22
|
|
|
private $resultMessage; |
23
|
|
|
|
24
|
|
|
/** @var PaymentStatus|null */ |
25
|
|
|
private $paymentStatus; |
26
|
|
|
|
27
|
|
|
/** @var mixed[]|null */ |
28
|
|
|
private $checkoutParams; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @param string $payId |
32
|
|
|
* @param DateTimeImmutable $responseDateTime |
33
|
|
|
* @param ResultCode $resultCode |
34
|
|
|
* @param string $resultMessage |
35
|
|
|
* @param PaymentStatus|null $paymentStatus |
36
|
|
|
* @param mixed[]|null $checkoutParams |
37
|
|
|
*/ |
38
|
1 |
|
public function __construct( |
39
|
|
|
string $payId, |
40
|
|
|
DateTimeImmutable $responseDateTime, |
41
|
|
|
ResultCode $resultCode, |
42
|
|
|
string $resultMessage, |
43
|
|
|
?PaymentStatus $paymentStatus, |
44
|
|
|
?array $checkoutParams |
45
|
|
|
) |
46
|
|
|
{ |
47
|
1 |
|
$this->payId = $payId; |
48
|
1 |
|
$this->responseDateTime = $responseDateTime; |
49
|
1 |
|
$this->resultCode = $resultCode; |
50
|
1 |
|
$this->resultMessage = $resultMessage; |
51
|
1 |
|
$this->paymentStatus = $paymentStatus; |
52
|
1 |
|
$this->checkoutParams = $checkoutParams; |
53
|
1 |
|
} |
54
|
|
|
|
55
|
1 |
|
public function getPayId(): string |
56
|
|
|
{ |
57
|
1 |
|
return $this->payId; |
58
|
|
|
} |
59
|
|
|
|
60
|
1 |
|
public function getResponseDateTime(): DateTimeImmutable |
61
|
|
|
{ |
62
|
1 |
|
return $this->responseDateTime; |
63
|
|
|
} |
64
|
|
|
|
65
|
1 |
|
public function getResultCode(): ResultCode |
66
|
|
|
{ |
67
|
1 |
|
return $this->resultCode; |
68
|
|
|
} |
69
|
|
|
|
70
|
1 |
|
public function getResultMessage(): string |
71
|
|
|
{ |
72
|
1 |
|
return $this->resultMessage; |
73
|
|
|
} |
74
|
|
|
|
75
|
1 |
|
public function getPaymentStatus(): ?PaymentStatus |
76
|
|
|
{ |
77
|
1 |
|
return $this->paymentStatus; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* @return mixed[]|null |
82
|
|
|
*/ |
83
|
1 |
|
public function getCheckoutParams(): ?array |
84
|
|
|
{ |
85
|
1 |
|
return $this->checkoutParams; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
} |
89
|
|
|
|