-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbinInquiryV4.php
More file actions
65 lines (52 loc) · 2.1 KB
/
binInquiryV4.php
File metadata and controls
65 lines (52 loc) · 2.1 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
<?php include('menu.php');?>
<form action="" method="post" class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Bin Sorgulama V4</legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="binNumber">Bin Numarası</label>
<div class="col-md-4">
<input id="binNumber" name="binNumber" type="text" placeholder=""
value="<?php echo ($_POST['binNumber']) ? $_POST['binNumber'] : '545616'; ?>" class="form-control input-md" required="">
</div>
</div>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for="binNumber">Tutar</label>
<div class="col-md-4">
<input id="amount" name="amount" type="text" placeholder=""
value="<?php echo ($_POST['amount']) ? $_POST['amount'] : '100'; ?>" class="form-control input-md" required="">
<label style="font-weight:normal; font-size:small">*Sipariş tutarı kuruş ayracı olmadan gönderilmelidir. Örneğin; 1 TL 100, 12 1200, 130 13000, 1.05 105, 1.2 120 olarak gönderilmelidir.</label>
</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>
<br />
<?php
if (!empty($_POST)) {
/*
* Setting ayarlarımızı alıyoruz.
* Bin numarası Kredi Kartının üzerindeki ilk 6 hanedir.
* Formdan gelen bilgi ile bin numarasını ve Setting ayarlarımızı post ediyoruz.
*/
$settings = new Settings ();
$request = new BinNumberInquiryRequestV4 ();
$request->binNumber = $_POST ["binNumber"];
$request->amount = $_POST ["amount"];
$request->threeD = "true";
$response = BinNumberInquiryRequestV4::execute ( $request, $settings ); // Bin sorgulama servisinin başlatıldığı kısım
$output = Helper::formattoJSONOutput( $response ); //bin sorgulama servisi sonucunda oluşan servis çıktı parametrelerinin gösterildiği kısım.
print "<h3>Sonuç:</h3>";
echo "<pre>";
echo htmlspecialchars ($output);
echo "</pre>";
}
include('footer.php');