forked from ipara/ipara-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinInquiry.php
More file actions
57 lines (42 loc) · 1.48 KB
/
binInquiry.php
File metadata and controls
57 lines (42 loc) · 1.48 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
<?php include('menu.php');?>
<form action="" method="post" class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend>Bin Sorgulama</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="492130" class="form-control input-md" 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">Sorgula</button>
</div>
</div>
</fieldset>
</form>
<br />
<?php if (!empty($_POST)): ?>
<?php
/*
* 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 BinNumberInquiryRequest ();
$request->binNumber = $_POST ["binNumber"];
$response = BinNumberInquiryRequest::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>";
?>
<?php endif; ?>
<?php include('footer.php');?>