arkadaşlar o çözüldü şimdi bakiye eklenmiyor yardımcı olabilecek var mı
https://dosya.co/2akzlqrqj7vx/shopier-notify.php.html
bakabilirseniz çok mutlu olurum
<?phpob_start();session_start();header('Set-Cookie: ' . session_name() . '=' . session_id() . '; SameSite=None; Secure');date_default_timezone_set('Europe/Istanbul');require_once 'corpanel/ayarlar/baglan.php';require_once 'corpanel/ayarlar/fonksiyon.php';
$ayarsor=$db->prepare("SELECT * FROM ayar where ayar_id=:id");$ayarsor->execute(array( 'id' => 0));$ayarcek=$ayarsor->fetch(PDO::FETCH_ASSOC);if (isset($_SESSION['userkullanici_mail'])) { $kullanicisor=$db->prepare("SELECT * FROM kullanici where kullanici_mail=:mail"); $kullanicisor->execute(array( 'mail' => $_SESSION['userkullanici_mail'] )); $say=$kullanicisor->rowCount(); $kullanicicek=$kullanicisor->fetch(PDO::FETCH_ASSOC); //Kullanıcı ID Session Atama if (!isset($_SESSION['userkullanici_id'])) {
$_SESSION['userkullanici_id']=$kullanicicek['kullanici_id']; }}if (empty($_SESSION['userkullanici_mail'])) { header("location:anasayfa"); exit;}?>
<?php
if($_POST){ if(!empty($_SESSION["yuklenecekbakiye"]) && !empty($_SESSION["siparisNoBilgisi"]) && !empty($kullanicicek["kullanici_id"])) { $SIPARISNO=$_SESSION["siparisNoBilgisi"]; $MUSTERIID=$kullanicicek["kullanici_id"]; $BAKIYE=$_SESSION["yuklenecekbakiye"]; if(!empty($kullanicicek["kullanici_bakiye"]) && $kullanicicek["kullanici_bakiye"]>0) { /*eğer kullanıcının daha önceden kredisi var ise o kredinin üzerine + yüklenecek bakiyeyi eklemesi gerekir */ $BAKIYE=($kullanicicek["kullanici_bakiye"]+$BAKIYE); /*müşteri bakiyesinde 5 tl var 20 tl daha yüklerse 25 olarak topalamlı ve güncellemeli*/ } $status = $_POST["status"]; $invoiceId = $_POST["platform_order_id"]; $transactionId = $_POST["payment_id"]; $installment = $_POST["installment"]; $signature = $_POST["signature"]; $data = $_POST["random_nr"] . $_POST["platform_order_id"] . $_POST["total_order_value"] . $_POST["currency"]; $signature = base64_decode($signature); $expected = hash_hmac('SHA256', $data, $shopierSecret, true); if ($expected) { $status = str_replace(" ","",strtolower($status)); if($status=="success") { /*burada artık bakiyesini güncelleyebiliriz.*/ $guncelle=$db->prepare("UPDATE kullanici SET kullanici_bakiye='".$BAKIYE."' WHERE kullanici_id=".$MUSTERIID.""); ?> <meta http-equiv="refresh" content="0;url=<?php echo $ayarcek['ayar_sitelink']; ?>bakiye-yukle?durum=success" /> <?php } else{ } } else { echo "status : ".$signature."@@".$expected." Erorr"; } } else { echo "No Member Sign Page! Erorr"; }}else{ echo "Bir Hata Oluştu, Sayfa Boş Gözüküyor...";}
?>