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