|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types = 1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Korobovn\CloudPayments\Message\Request\Model; |
|
6
|
|
|
|
|
7
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\NameString; |
|
8
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\AmountFloat; |
|
9
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\CurrencyString; |
|
10
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\EmailStringNull; |
|
11
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\IpAddressString; |
|
12
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\JsonDataStringNull; |
|
13
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\AccountIdStringNull; |
|
14
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\InvoiceIdStringNull; |
|
15
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\CardCryptogramPacketString; |
|
16
|
|
|
use Korobovn\CloudPayments\Message\Traits\ModelField\DescriptionStringNull; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* @see https://developers.cloudpayments.ru/#oplata-po-kriptogramme |
|
20
|
|
|
*/ |
|
21
|
|
|
class CryptogramPaymentModel extends AbstractModel |
|
22
|
|
|
{ |
|
23
|
|
|
use AmountFloat, |
|
24
|
|
|
CurrencyString, |
|
25
|
|
|
IpAddressString, |
|
26
|
|
|
NameString, |
|
27
|
|
|
CardCryptogramPacketString, |
|
28
|
|
|
InvoiceIdStringNull, |
|
29
|
|
|
DescriptionStringNull, |
|
30
|
|
|
AccountIdStringNull, |
|
31
|
|
|
EmailStringNull, |
|
32
|
|
|
JsonDataStringNull; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* {@inheritDoc} |
|
36
|
|
|
*/ |
|
37
|
|
|
public function toArray(): array |
|
38
|
|
|
{ |
|
39
|
|
|
return [ |
|
40
|
|
|
'Amount' => $this->getAmount(), |
|
41
|
|
|
'Currency' => $this->getCurrency(), |
|
42
|
|
|
'IpAddress' => $this->getIpAddress(), |
|
43
|
|
|
'Name' => $this->getName(), |
|
44
|
|
|
'CardCryptogramPacket' => $this->getCardCryptogramPacket(), |
|
45
|
|
|
'InvoiceId' => $this->getInvoiceId(), |
|
46
|
|
|
'Description' => $this->getDescription(), |
|
47
|
|
|
'AccountId' => $this->getAccountId(), |
|
48
|
|
|
'Email' => $this->getEmail(), |
|
49
|
|
|
'JsonData' => $this->getJsonData(), |
|
50
|
|
|
]; |
|
51
|
|
|
} |
|
52
|
|
|
} |
|
53
|
|
|
|