-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.php
91 lines (65 loc) · 2.24 KB
/
post.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
91
<?php
/**
*
*
* Paratika sanal pos (hpp) ve Direct 3D Pos kurulumu için gerekli ayarları barınıdır.
*
* @category Sanal Pos Kurulumu
* @author Hasan Kaya <[email protected]>
* @copyright 2021 Buhusoft
* @license http://www.php.net/license/3_01.txt PHP License 3.01
*/
require_once("ParatikaConf.class.php");
/**
* Paratika Sanal Pos Kurulumu
*/
$paratika = new ParatikaOdemeYap;
$paratika->aliciMail = "[email protected]";
$paratika->aliciAdSoyad = "Hasan Kaya";
$paratika->aliciTelefon = "00000000000";
$paratika->musteriAdres = "Müşteri Adres";
$paratika->musteriSehir = "Müşteri Şehir";
$paratika->musteriUlke = "Türkiye";
$paratika->musteriPostaKodu = "34440";
$paratika->musteriTelefon = "05355555555";
//tek ürün gönderimi
$urun = array(
"code"=>12345,
"name"=>"ödeme",
"quantity"=>1,
"description"=>"Deneme urunu",
"amount"=>10
);
$paratika->urun = json_encode($urun);
$paratika->tutar = 10;
$req = json_decode($paratika->createToken(),true);
if($req["Status"] == true) {
$token = $req["token"];
$url = $req["url"];
$formUrl = $req["formUrl"];
$apiType = $req["ApiType"];
}else{
echo json_encode($req);
die;
}
if($apiType == "3D_PAY_HOSTING"){
$paratika->odemeYonlendir($token);
}else{?>
<form action="<?php echo $formUrl; ?>" method="post">
<input type="text" name="cardOwner" placeholder="Card Owner" maxlength="32" value="h kaya" />
<input type="text" name="pan" placeholder="PAN" maxlength="19" value="4546711234567894" />
<select name="expiryMonth">
<option value="12">February</option>
</select>
<select name="expiryYear">
<option value="2026">2026</option>
</select>
<input type="password" name="cvv" placeholder="CVV" maxlength="4" value="000" />
<input type="checkbox" name="saveCard" />
<input type="text" name="cardName" placeholder="Card Name" value="test test"/>
<input type="text" name="cardCutoffDay" placeholder="Card Cutoff Day" value="1"/>
<input type="text" name="installmentCount" placeholder="Installment Count" value="5"/>
<input type="hidden" name="points" />
<input type="submit" value="Submit" />
</form>
<?php } ?>