forked from ipara/ipara-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetCardFromWallet.php
More file actions
67 lines (49 loc) · 2.05 KB
/
GetCardFromWallet.php
File metadata and controls
67 lines (49 loc) · 2.05 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
<?php include('menu.php');?>
<form action="" method="post" class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Cüzdandaki Kartları Listele</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="">Kullanıcı Id:</label>
<div class="col-md-4">
<input name="userId" type="text" value="123456" class="form-control input-md" required="">
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for=""> Kart ID (Opsiyonel):</label>
<div class="col-md-4">
<input value="" name="cardId" class="form-control input-md" >
</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">Sorgula</button>
</div>
</div>
</fieldset>
</form>
<?php if (!empty($_POST)): ?>
<?php
$settings = new Settings();
/*
* Cüzdandaki kartları listelemek için kullanıclan sayfadır.
* Setting ayarlarımızı alıyoruz.
* Formdan gelen bilgilerle BankCardInquiryRequest sınıfımızı dolduruyoruz
* BankCardInquiryRequest ve Setting ayarlarımızla sayfamızı post ediyoruz.
*/
$request = new BankCardInquiryRequest();
$request->userId = $_POST["userId"];
$request->cardId = $_POST["cardId"];
$request->clientIp=Helper::get_client_ip();
$response=BankCardInquiryRequest::execute($request,$settings); // Cüzdandaki kartları listelemek için servis çağrısının yapıldığı kısımdır.
$output = Helper::formattoJSONOutput($response);//Cüzdandaki ekranları listeleme için yapılan çağrı sonucu oluşan servis çıktı parametrelerinin ekranda göstermemize olanak sağlandığı kısımdır.
print "<h3>Sonuç:</h3>";
echo "<pre>";
echo htmlspecialchars($output);
echo "</pre>";
?>
<?php endif; ?>
<?php include('footer.php');?>