-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathLinkPaymentListRequest.php
53 lines (46 loc) · 1.66 KB
/
LinkPaymentListRequest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
class LinkPaymentListRequest extends BaseRequest
{
// LinkPayment servisi body parametreleri
private $email;
private $gsm;
private $linkState;
private $startDate;
private $endDate;
private $pageSize;
private $pageIndex;
private $clientIp;
private $linkId;
public function __construct($requestData)
{
$this->email = $requestData['email'];
$this->gsm = $requestData['gsm'];
$this->linkState = $requestData['linkState'];
$this->startDate = $requestData['startDate'];
$this->endDate = $requestData['endDate'];
$this->linkId = $requestData['linkId'];
$this->pageSize = $requestData['pageSize'];
$this->pageIndex = $requestData['pageIndex'];
$this->clientIp = Helper::get_client_ip();
}
public function execute(Settings $settings)
{
$settings->transactionDate = Helper::GetTransactionDateString();
$settings->HashString = $settings->PrivateKey . $this->clientIp . $settings->transactionDate;
return restHttpCaller::post($settings->BaseUrl . "/corporate/merchant/linkpayment/list", Helper::GetHttpHeaders($settings, "application/json"), $this->toJsonString());
}
public function toJsonString()
{
return json_encode([
"email" => $this->email,
"gsm" => $this->gsm,
"linkState" => $this->linkState,
"startDate" => $this->startDate,
"endDate" => $this->endDate,
"linkId" => $this->linkId,
"pageSize" => $this->pageSize,
"pageIndex" => $this->pageIndex,
"clientIp" => $this->clientIp
]);
}
}