📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
e-ticaretv9.demodesign.com.tr
📝
paytr_result.php
← Geri Dön
<?php include('init.php'); $paytr_api = $db->table('virtual_pos')->where('id','=',1)->get_var('api_json'); $paytr_api = json_decode($paytr_api,true); if($_POST['hash']=='') { echo 'OK'; exit; } else { $informations = $db->table('orders')->where('status','=','1')->where('id','=',$_POST['merchant_oid'])->order('id','asc')->get(); if($informations['total_count']=="0") { echo 'OK'; exit; } $info = $informations['data'][0]; } $merchant_id = $paytr_api['merchant']['value']; $merchant_key = $paytr_api['key']['value']; $merchant_salt = $paytr_api['salt']['value']; $hash = base64_encode( hash_hmac('sha256', $_POST['merchant_oid'].$merchant_salt.$_POST['status'].$_POST['total_amount'], $merchant_key, true) ); if($hash==$_POST["hash"]) { if($_POST['status']=='success') { $data = [ 'status' => 2 ]; $query = $db->table('orders')->where('id','=',$info['id'])->update($data); } else { $data = [ 'status' => 6 ]; $query = $db->table('orders')->where('id','=',$info['id'])->update($data); } echo 'OK'; } else { die('PAYTR notification failed: bad hash'); exit; } ?>
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula