-
Notifications
You must be signed in to change notification settings - Fork 13
/
DeleteCardFromWallet.php
66 lines (50 loc) · 1.92 KB
/
DeleteCardFromWallet.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
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php include('menu.php');?>
<form action="" method="post" class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Cüzdandan Kart Sil</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="<?php echo ($_POST['cardId']) ? $_POST['cardId'] : ''; ?>" 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">Kart Sil</button>
</div>
</div>
</fieldset>
</form>
<?php if (!empty($_POST)): ?>
<?php
/*
* Cüzdandaki kartları silmek için kullanılan sayfadır.
* Setting ayarlarımızı alıyoruz.
* Formdan gelen bilgilerle BankCardDeleteRequest sınıfımızı dolduruyoruz
* BankCardDeleteRequest ve Setting ayarlarımızla sayfamızı post ediyoruz.
*/
$settings = new Settings ();
$request = new BankCardDeleteRequest ();
$request->userId = $_POST ["userId"];
$request->cardId = $_POST ["cardId"];
$request->clientIp = Helper::get_client_ip ();
$response = BankCardDeleteRequest::execute ( $request, $settings ); //Cüzdandaki kartları silmek için servis çağrısının yapıldığı kısımdır.
$output = Helper::formattoJSONOutput ( $response ); //Cüzdandaki kartları silmek için yapılan çağrı 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');?>