fee-status

Online Fee Payment Status

"; print_r($dataSize); echo "
";for($i = 0; $i < $dataSize; $i++) { $information=explode('=',$decryptValues[$i]); $data[] = $information; if($i==3) $order_status= $order_data['order_status'] = $information[1]; if($i==0) $order_id = $order_id['order_id'] = $information[1]; if($i==11) $billing_name = $billing_name['billing_name'] = $information[1]; if($i==26) $merchant_param1 = $merchant_param1['merchant_param1'] = $information[1]; if($i==27) $merchant_param2 = $merchant_param2['merchant_param2'] = $information[1]; if($i==17) $billing_tel= $order_data['billing_tel'] = $information[1]; if($i==1) $tracking_id = $order_data['tracking_id'] = $information[1]; if($i==2) $bank_ref = $order_data['bank_ref'] = $information[1]; if($i==4) $fail_msg= $order_data['fail_msg'] = $information[1]; if($i==5) $payment_mode = $order_data['payment_mode'] = $information[1]; if($i==10) $amount=$order_data['amount'] = $information[1]; if($i==35) $mer_amount =$order_data['mer_amount'] = $information[1]; if($i==40) $trans_date =date("Y-m-d H:i:s", strtotime($information[1])); } if($dataSize) { $servername = "103.76.228.38"; $database = "nbsedqvs_trastatustesting"; $username = "nbsedqvs_status"; $password = "nbs@12345";$conn = mysqli_connect($servername, $username, $password, $database);// Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } $selectSql = "SELECT bank_ref_no from testing where bank_ref_no = $bank_ref"; $result = $conn->query($selectSql);if ($result->num_rows <= 0 && isset($_POST)) { $sqlQuery = "INSERT INTO testing (order_id, tranbilling_tel, billing_name, merchant_param1, merchant_param2, tracking_id, bank_ref_no, order_status, failure_message, payment_mode, amount, mer_amount, trans_date) VALUES ('$order_id','$billing_tel','$billing_name','$merchant_param1','$merchant_param2','$tracking_id','$bank_ref','$order_status','$fail_msg','$payment_mode','$amount','$mer_amount','$trans_date')";if (mysqli_query($conn, $sqlQuery)) { $to = 'info@nbs.edu.in'; $cc = 'accounts@nbs.edu.in'; $subject = 'online Fee Payment';$message = 'online Fee Payment Details
Order ID'.$billing_name.'
Order ID'.$merchant_param1.'
Billing Telephone'.$billing_tel.'
Transaction Amount'.$amount.'
Merchant Amount'.$mer_amount.'
Remarks'.$merchant_param2.'
Order ID'.$order_id.'
Tracking ID'.$tracking_id.'
Bank Reference No'.$bank_ref.'
Order Status'.$order_status.'
Failure Message'.$fail_msg.'Payment Mode'.$payment_mode.'
Transaction Date'.$trans_date.'
';// To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";// Additional headers $headers .= 'From: fees ' . "\r\n"; $headers .= 'Cc: accounts@nbs.edu.in' . "\r\n";// Mail it if(mail($to, $subject, $message, $headers)) { //echo 'Email sent'; die; } else { //echo 'Error in Email'; die; } } else { //echo "Error: " . $sql . "
" . mysqli_error($conn); } mysqli_close($conn); } } if($order_status==="Success") { echo "

Your transaction is successful. Thanks for Online payment.

"; } else if($order_status==="Aborted") { echo "
Your Transaction has be Cancelled. Please Try again."; } else if($order_status==="Failure") { echo "

Your transaction has been declined. please try again.

"; } else { echo "

Security Error. Illegal access detected. please try again.

"; } echo "

"; echo "
"; ?>
"; echo ""; echo "";echo""; echo ""; echo ""; echo "";echo""; echo ""; echo ""; echo "";echo""; echo ""; echo ""; echo "";echo""; echo ""; echo ""; echo "";echo""; echo ""; echo ""; ?>
Student Name$billing_name
Mobile No.$billing_tel
Tracking ID$tracking_id
Amount$amount
Bank Reference No.$bank_ref