-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathLinkPaymentList.php
More file actions
125 lines (105 loc) · 6.64 KB
/
Copy pathLinkPaymentList.php
File metadata and controls
125 lines (105 loc) · 6.64 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php include('menu.php');?>
<form action="" method="post" class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Link İle Ödeme (Link Sorgulama)</legend>
<div class="form-group">
<label class="col-md-4 control-label" for="">Müşteri Eposta : </label>
<div class="col-md-4">
<input value="<?php echo isset($_POST['email']) ? $_POST['email'] : 'mail@example.com'; ?>" name="email" class="form-control input-md">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="">Müşteri Cep Telefonu : </label>
<div class="col-md-4">
<input value="<?php echo isset($_POST['gsm']) ? $_POST['gsm'] : ''; ?>" name="gsm" class="form-control input-md">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="">Link Durumu : </label>
<div class="col-md-4">
<select name="linkState" class="form-control">
<option value="-1" <?php echo (isset($_POST['linkState']) && $_POST['linkState'] == '-1') ? 'selected' : ''; ?>>Seçiniz</option>
<option value="0" <?php echo (isset($_POST['linkState']) && $_POST['linkState'] == '0') ? 'selected' : ''; ?>>Link İsteği Alındı</option>
<option value="1" <?php echo (isset($_POST['linkState']) && $_POST['linkState'] == '1') ? 'selected' : ''; ?>>Link URL’i yaratıldı</option>
<option value="2" <?php echo (isset($_POST['linkState']) && $_POST['linkState'] == '2') ? 'selected' : ''; ?>>Link Gönderildi, Ödeme Bekleniyor</option>
<option value="3" <?php echo (isset($_POST['linkState']) && $_POST['linkState'] == '3') ? 'selected' : ''; ?>>Link ile Ödeme Başarılı</option>
<option value="98" <?php echo (isset($_POST['linkState']) && $_POST['linkState'] == '98') ? 'selected' : ''; ?>>Link Zaman Aşımına Uğradı</option>
<option value="99" <?php echo (isset($_POST['linkState']) && $_POST['linkState'] == '99') ? 'selected' : ''; ?>>Link Silindi</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="">Link Oluşturma Alanına Ait Arama Başlangıç Tarihi * : </label>
<div class="col-md-4 form-inline">
<input value="<?php echo isset($_POST['start_day']) ? $_POST['start_day'] : date('d'); ?>" name="start_day" class="form-control input-md" style="width: 80px; text-align: center;" maxlength="2" required="required">
<input value="<?php echo isset($_POST['start_month']) ? $_POST['start_month'] : date('m'); ?>" name="start_month" class="form-control input-md" style="width: 80px; text-align: center;" maxlength="2" required="required">
<input value="<?php echo isset($_POST['start_year']) ? $_POST['start_year'] : date('Y'); ?>" name="start_year" class="form-control input-md" style="width: 112px; text-align: center;" maxlength="4" required="required">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="">Link Oluşturma Alanına Ait Arama Başlangıç Tarihi * : </label>
<div class="col-md-4 form-inline">
<input value="<?php echo isset($_POST['end_day']) ? $_POST['end_day'] : date('d'); ?>" name="end_day" class="form-control input-md" style="width: 80px; text-align: center;" maxlength="2" required="required">
<input value="<?php echo isset($_POST['end_month']) ? $_POST['end_month'] : date('m'); ?>" name="end_month" class="form-control input-md" style="width: 80px; text-align: center;" maxlength="2" required="required">
<input value="<?php echo isset($_POST['end_year']) ? $_POST['end_year'] : date('Y'); ?>" name="end_year" class="form-control input-md" style="width: 112px; text-align: center;" maxlength="4" required="required">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="">Ödeme Linki ID : </label>
<div class="col-md-4">
<input value="<?php echo isset($_POST['linkId']) ? $_POST['linkId'] : null; ?>" name="linkId" class="form-control input-md">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="">Toplam Gösterilebilecek Sayfa Sayısı * : </label>
<div class="col-md-4">
<select name="pageSize" class="form-control">
<?php
$out = '';
for ($page = 5; $page <= 15; $page++) {
$out .= "<option ";
$out .= (isset($_POST['pageSize']) && $_POST['pageSize'] == $page) ? 'selected' : '';
$out .= ">$page</option>";
}
echo $out;
?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for="">Gösterilecek Sayfa Numarası * : </label>
<div class="col-md-4">
<input value="<?php echo isset($_POST['pageIndex']) ? $_POST['pageIndex'] : '1'; ?>" name="pageIndex" class="form-control input-md" required="required">
</div>
</div>
<!-- Button -->
<div class="form-group">
<label class="col-md-4 control-label" for=""></label>
<div class="col-md-4">
<button type="submit" id="" name="" class="btn btn-success">Ödeme Linklerini Listele</button>
</div>
</div>
</fieldset>
</form>
<?php
if (!empty($_POST)) {
$settings = new Settings();
$requestData = [
"email" => $_POST['email'],
"gsm" => $_POST['gsm'],
"linkState" => ($_POST['linkState'] > -1) ? $_POST['linkState'] : null,
"startDate" => date ( "Y-m-d H:i:s", mktime(00, 00, 00, $_POST['start_month'], $_POST['start_day'], $_POST['start_year'])),
"endDate" => date ( "Y-m-d H:i:s", mktime(23, 59, 59, $_POST['end_month'], $_POST['end_day'], $_POST['end_year'])),
"pageSize" => $_POST['pageSize'],
"pageIndex" => $_POST['pageIndex']
];
$linkPaymentRequest = new LinkPaymentListRequest($requestData);
$response = $linkPaymentRequest->execute($settings);
$output = Helper::formattoJSONOutput($response);
print "<h3>Sonuç:</h3>";
echo "<pre>";
echo htmlspecialchars($output);
echo "</pre>";
}
include('footer.php');