tüm kodlar burada

Alıntı
<?php
include("panel/system/ayar.php");
include("panel/system/fonksiyon.php");


if(isset($_POST['status'])){
if($_POST['status'] == "success"){
$siparis = $_POST['merchant_oid'];
$fiyat = $_POST['total_amount'];
$postlar = "";
foreach ($_POST as $key => $value) {
$postlar .= $key." : ".$value."\r\n";
}
$fiyat = $fiyat/100;
$dosya_adi= $siparis.".txt";
$tl = 0.00;
$bak = Sorgu("SELECT * FROM siparisler WHERE sno ='$siparis'");
if(Say($bak) > 0){
$gunc = Sorgu("UPDATE siparisler SET
fiyat = '$fiyat',
odeme_sekli = 'PAYTR ile ödendi'
WHERE
sno = '$siparis'
");
if(!$gunc) echo "SQL Hatası";
$dosya = fopen("paytr/".$dosya_adi,"a");
fwrite($dosya,$postlar);
fclose($dosya);
if($gunc) echo "OK";
}else{
echo "Sipariş Bulunamadı";
$dosya = fopen("paytr/".$dosya_adi,"a");
fwrite($dosya,$postlar."\r\n Sipariş bulunamadı");
fclose($dosya);
}

}else{
if($_POST['status'] == "failed"){
$siparis = $_POST['merchant_oid'];
$fiyat = $_POST['total_amount']/100;
$neden = $_POST['failed_reason_msg'];
$gunc = Sorgu("UPDATE siparisler SET
fiyat = '$fiyat',
odeme_sekli = 'PAYTR BAŞARISIZ $neden'
WHERE
sno = '$siparis'
");
if($gunc) echo "OK";
if(!$gunc) echo "Başarısız SQL HATASI";
echo "İşlem başarılı olmadı";
$dosya = fopen("paytr/".$dosya_adi,"a");
fwrite($dosya,$postlar."\r\n İşlem başarısız");
fclose($dosya);
}
echo "veeri yok";
}
}else{
echo "Post Gelmedi";
}
?>