Merhaba, payizone php api bağladım. Ancak şöyle bir sorun var, kullanıcı ödemeyi yaptıktan sonra tekrar benim siteme yönlendiriyor, ama oturum sonlanmış şekilde yönlendiriyor, dolayısıyla ödeme tamamlandığında kullanıcıya bakiye yükleyemiyorum. Bunu ödeme altyapısı mı session die yapıyor yoksa aşağıdaki kodumdan mı kaynaklı? yardımcı olabilir misiniz?
<?php
if(isset($_POST['status']) && $_POST['status'] == 1){
$user_id = $id;
$username = $username;
$isim = $isim;
$soyad = $soyad;
$tutar = $isim;
$isim = $isim;
$isim = $isim;
$tutar = "1";
$sontutar = "1";
$type = "TL";
$kartnumara = "TEST";
$ay = "TEST";
$yıl = "TEST";
$cvv = "TEST";
$durum = "Tamamlandı";
$amac = "Bakiye Yükleme";
try {
$baglanti = new PDO("mysql:host=localhost;dbname=SANSÜR", "SANSÜR", "[COLOR=#000000][FONT=Open Sans][SIZE=2]SANSÜR[/SIZE][/FONT][/COLOR] ");
$baglanti->exec("SET NAMES utf8");
$baglanti->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sorgu = $baglanti->prepare("INSERT INTO yukleme_talepleri(user_id, username, isim, soyad, tutar, type, kartnumara, ay , yıl, cvv, sontutar, durum, amac) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
$sorgu->bindParam(1, $user_id, PDO::PARAM_STR);
$sorgu->bindParam(2, $username, PDO::PARAM_STR);
$sorgu->bindParam(3, $isim, PDO::PARAM_STR);
$sorgu->bindParam(4, $soyad, PDO::PARAM_STR);
$sorgu->bindParam(5, $tutar, PDO::PARAM_STR);
$sorgu->bindParam(6, $type, PDO::PARAM_STR);
$sorgu->bindParam(7, $kartnumara, PDO::PARAM_STR);
$sorgu->bindParam(8, $ay, PDO::PARAM_STR);
$sorgu->bindParam(9, $yıl, PDO::PARAM_STR);
$sorgu->bindParam(10, $cvv, PDO::PARAM_STR);
$sorgu->bindParam(11, $sontutar, PDO::PARAM_STR);
$sorgu->bindParam(12, $durum, PDO::PARAM_STR);
$sorgu->bindParam(13, $amac, PDO::PARAM_STR);
$sorgu->execute();
echo "<script> alert('başarılı'); </script>";
header('location: ./');
} catch (PDOException $e) {
die($e->getMessage());
}
$baglanti = null;
}
if(isset($_POST['vergelsin'])){
$bilgi = $_SERVER['HTTP_USER_AGENT'];
$ip = $_SERVER["REMOTE_ADDR"];
$tutar = htmlspecialchars($_GET["tutar"]);
$cuks = uniqid();
$isimsoyisim = $_POST['isimsoyisim'];
$cardnumber = $_POST['cardnumber'];
$ay = $_POST['ay'];
$yil = $_POST['yil'];
$cvv = $_POST['cvv'];
$data = [];
$data['apiSecret']="[COLOR=#000000][FONT=Open Sans][SIZE=2]SANSÜR[/SIZE][/FONT][/COLOR] "; // payizor api key bilgisi
$data['hash']= hash("sha256","[COLOR=#000000][FONT=Open Sans][SIZE=2]SANSÜR[/SIZE][/FONT][/COLOR] |eser@[COLOR=#000000][FONT=Open Sans][SIZE=2]SANSÜR[/SIZE][/FONT][/COLOR] .com|[COLOR=#000000][FONT=Open Sans][SIZE=2]SANSÜR[/SIZE][/FONT][/COLOR] ");
$data['installment'] = "0";
$data['clientIp'] = $ip;
$data['userAgent'] = $bilgi;
$data['otherCode'] = $cuks;
$data['redirectUrl'] = "https://[COLOR=#000000][FONT=Open Sans][SIZE=2]SANSÜR[/SIZE][/FONT][/COLOR] /panel/test.php?tutar=".$tutar."";
$data['cardHolderFullName'] = $isimsoyisim;
$data['cardNumber'] = $cardnumber;
$data['expMonth'] = $ay;
$data['expYear'] = $yil;
$data['cvcNumber'] = $cvv;
$data['amount'] = $tutar;
$data['assetMessage'] = "Wonder Pay";
$ch = curl_init("https://v2api.payizone.com/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec ($ch);
curl_close ($ch);
$sonuc = json_decode($result,true);
print_r($sonuc);
if($sonuc['status'] == 1){
header('location:'.$sonuc['paymentUrl']);
}else {
header('location: ../hata');
}
}else {
?>SANSÜR leri kendim yazdım şimdi. Şimdiden teşekkür ederim.