forked from GarantiETicaret/garanti-eticaret-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BINInq.php
90 lines (74 loc) · 3.06 KB
/
BINInq.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php include('menu.php');?>
<h2>BIN Sorgulama</h2>
<br />
<fieldset>
<legend><label style="font-weight:bold;width:250px;">Terminal Bilgileri</label></legend>
<label style="font-weight:bold;">Servis Adı : </label> Bin Sorgulama<br>
<label style="font-weight:bold;">Terminal ID : </label> 30691297 <br>
<label style="font-weight:bold;">MerchantID : </label> 7000679 <br>
<label style="font-weight:bold;">ProvUserID : </label> PROVAUT <br>
<label style="font-weight:bold;">UserID : </label> PROVAUT<br>
</fieldset>
<form action="" method="post" class="form-horizontal">
<fieldset>
<!-- Form Name -->
<legend><label style="font-weight:bold;width:250px;">Sipariş Bilgileri</label></legend>
<!-- Text input-->
<div class="form-group">
<label class="col-md-4 control-label" for=""> Kart Tipi:</label>
<div class="col-md-4">
<input value="A" name="cardType" class="form-control input-md" >
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label" for=""> Grup Tipi:</label>
<div class="col-md-4">
<input value="A" name="groupType" class="form-control input-md" >
</div>
</div>
</fieldset>
<!-- 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-danger"> Sorgulama Yap</button>
</div>
</div>
</form>
<?php if (!empty($_POST)): ?>
<?php
$settings=new Settings();
$terminal=new Terminal();
$request = new BINInqRequest();
$request->Version = $settings->Version;
$request->Mode = $settings->Mode;
$request->Customer = new Customer();
$request->Customer->EmailAddress="eticaret@garanti.com.tr";
$request->Customer->IPAddress="127.0.0.1";
$request->Card = new Card();
$request->Card->CVV2="";
$request->Card->ExpireDate="";
$request->Card->Number="";
$request->Order = new Order();
$request->Order->OrderID="";
$request->Order->Description="";
$request->Terminal= new Terminal();
$request->Terminal->ProvUserID=$terminal->ProvUserID;
$request->Terminal->UserID=$terminal->UserID;
$request->Terminal->ID=$terminal->ID;
$request->Terminal->MerchantID=$terminal->MerchantID;
$request->Transaction = new Transaction();
$request->Transaction->Amount="100";
$request->Transaction->Type="bininq";
$request->CurrencyCode="949";
$request->CardType=$_POST["cardType"] ;
$request->Group=$_POST["groupType"] ;
$request->hash=Helper::ComputeHash($request,$settings);
$response = BINInqRequest::execute($request,$settings); //BINInqRequest servisi başlatılması için gerekli servis çağırısını temsil eder.
print "<h3>Sonuç:</h3>";
echo "<pre>";
echo htmlspecialchars ($response);
echo "</pre>";
?>
<?php endif; ?>
<?php include('footer.php');?>