<?php session_start(); include "../kernel.php"; include_once "../class/nusoap.php"; $out = ''; if (isset($_REQUEST['RefId']) && isset($_REQUEST['ResCode']) && isset($_REQUEST['SaleOrderId']) && isset($_REQUEST['SaleReferenceId']) && isset($_REQUEST['CardHolderInfo'])) { $RefId = $_REQUEST['RefId']; $ResCode = $_REQUEST['ResCode']; $SaleOrderId = $_REQUEST['SaleOrderId']; $SaleReferenceId = $_REQUEST['SaleReferenceId']; $CardHolderInfo = $_REQUEST['CardHolderInfo']; $bank_out = array('RefId' => $RefId, 'ResCode' => $ResCode, 'SaleOrderId' => $SaleOrderId, 'SaleReferenceId' => $SaleReferenceId, 'CardHolderInfo' => $CardHolderInfo); $pay = pay_class::verify($SaleOrderId, $SaleReferenceId); if (($pay == '0' || (int) $pay == 43) && !is_array($pay)) { $pardakht = new pardakht_class($SaleOrderId); $pardakht->bank_out = serialize($bank_out); $sanad_record_id = sanad_class::getLastSanad_record_id(); $sanad_record_id_ticket = $sanad_record_id; //-------------ticket ---------- if (!($pardakht->is_tmp && !$pardakht->is_hotel)) { pay_class::revers($SaleOrderId, $SaleReferenceId); die('<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><center>در پردازش مشکلی پیش آمده است مجدد تلاش نمایید در صورت پرداخت وجه مبلغی از حساب شما کم نشده است <br/><a href="index.php" >بازگشت</a></center></body></html>'); } $res_tmp = explode(',', $pardakht->sanad_record_id); $ghimat_kharid = 0; $ticket_ids = array(); $ticket_error = FALSE; $ticket_ids = array(); $shenavar = array(); $tedad = 0;
public static function getBracode_Id_BySanad_record_id($sanad_record_id) { $out = '---'; $mysql = new mysql_class(); $mysql->ex_sql("select id from pardakht where sanad_record_id=" . $sanad_record_id, $q); if (isset($q[0])) { $out = pardakht_class::getBarcode($q[0]['id']); } return $out . ' - ' . $q[0]['id']; }
} for ($k = 0; $k < count($tmp_id); $k++) { } if ($kharid_typ == 'naghdi') { $bool = TRUE; $tarikh_now = date("Y-m-d H:i:s"); /* for($k=0;$k<count($tmp_id);$k++) if(!ticket_class::updateTmp($tmp_id[$k],$info_ticket)) $bool = FALSE; * */ if ($bool) { $mysql = new mysql_class(); $pardakht_id = pardakht_class::add(implode(',', $tmp_id), $tarikh_now, $jam_ghimat1, toJSON(array('ticket' => $info_ticket, 'parvaz' => $log_text_info, 'netlog' => $netlog, 'rwaitlog' => $rwaitlog))); $pardakht = new pardakht_class($pardakht_id); $rahgiri = $pardakht->getBarcode(); if ($conf->ps === TRUE) { $pay_code = pay_class::ps_pay($pardakht_id, $jam_ghimat1); } else { if ($conf->payline === TRUE) { $pay_code = pay_class::pl_pay($pardakht_id, $jam_ghimat1); $mysql->ex_sqlx("update `pardakht` set `bank_out` = '{$pay_code}' where `id` = {$pardakht_id}"); } else { $pay_code = pay_class::pay($pardakht_id, $jam_ghimat1); } } //var_dump($pay_code); $tmpo = explode(',', $pay_code); if (count($tmpo) == 2 && $tmpo[0] == 0 && $conf->ps !== 'TRUE') { $redirect = "<script language=\"javascript\">alert(\"کد رهگیری خود را یادداشت نمایید \\n {$rahgiri} \\n سپس به بانک هدایت می شوید\");postRefId('" . $tmpo[1] . "');</script>";
function getRahgiri($inp) { $ou = pardakht_class::getBracode_Id_BySanad_record_id($inp); return $ou; }
<?php include_once "../kernel.php"; $SESSION = new session_class(); register_shutdown_function('session_write_close'); session_start(); if (!isset($_SESSION[$conf->app . '_user_id'])) { die('error'); } if (isset($_REQUEST['trans_id']) && isset($_REQUEST['id_get'])) { $trans_id = trim($_REQUEST['trans_id']); $id_get = trim($_REQUEST['id_get']); $result = (int) pay_class::pl_get($trans_id, $id_get); $bank_out = array('trans_id' => $trans_id, 'id_get' => $id_get); $pardakht = new pardakht_class(); $pardakht->loadPaylineByBankOut((int) $id_get); if ((int) $result > 0 && $pardakht->id > 0) { $pardakht->bank_out = serialize($bank_out); $sanad_record_id = sanad_class::getLastSanad_record_id(); $sanad_record_id_ticket = $sanad_record_id; //-------------ticket ---------- $res_tmp = explode(',', $pardakht->sanad_record_id); $ghimat_kharid = 0; $ticket_ids = array(); $ticket_error = FALSE; $ticket_ids = array(); $shenavar = array(); $tedad = 0; for ($i = 0; $i < count($res_tmp); $i++) { $reserve_tmp = new reserve_tmp_class($res_tmp[$i]); if ($reserve_tmp->info != '' && $reserve_tmp->info != null) {
//-------------- shenavar sanad------------ $sanad_record_id = sanad_class::getLastSanad_record_id(); $user_id = isset($_SESSION[$conf->app . '_user_id']) ? (int) $_SESSION[$conf->app . '_user_id'] : -1; foreach ($shenavar as $par) { parvaz_det_class::sanad_shenavar_kharid($par, $tedad, $sanad_record_id, $user_id); } //Sabte sanade pardakht parvaz.------------ $sanad_record_id = sanad_class::getLastSanad_record_id(); $tozihat = ' بابت خرید نقدی بلیت به شماره سند ' . $sanad_record_id_ticket; customer_class::pardakht($sanad_record_id, $info[0]->customer_id, $pardakht->mablagh, $tozihat, $user_id); $mysql = new mysql_class(); foreach ($res_tmp as $tmpid) { $mysql->ex_sqlx("delete from `reserve_tmp` where `id` = " . $tmpid); } $rev = pay_class::settle($SaleOrderId, $SaleReferenceId); $rahgiri = pardakht_class::getBarcode($pardakht->id); $email = '*****@*****.**'; $text = ' <html> <body dir="rtl" style="font-family:tahoma;" > <h3> خرید بلیت به شماره رهگیری ' . $pardakht->id . ' <br/> </h3> <span style="font-family:tahoma" > سامانه رزرواسیون پرواز بهار <br/> www.gcom.ir </span> </body> </html> ';