GIF89a;
Direktori : /home/serb/public_html/ |
Current File : /home/serb/public_html/ad_pay.php |
<?php session_start(); include("lib/globals.php"); include("lib/common.php"); include("lib/functions.php"); if(!isset($_SESSION['SH_AD_ID'])) { header("Location: index.php"); exit; } $SITE_URL = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $url_array = explode("/",$SITE_URL); unset($url_array[count($url_array)-1]); $SITE_URL = implode("/",$url_array)."/"; $post_array = array(); $sh_TRANSACTION_MODE = "LIVE"; $payment_sql = "SELECT bannerprice,fname FROM `advertise_banner` WHERE banner_id = '".$_SESSION['SH_AD_ID']."' AND `status` = 'u'"; $payment_res = execute_query($payment_sql) or die(mysql_error()); $payment_row = mysql_fetch_array($payment_res); $payment = str_replace('$','',$payment_row['bannerprice']); $payee_name = $payment_row['fname']; $paymet_gateway_url = "https://pwnbill.com/pay_now.php"; $post_array['__TRANSACTION_MODE__'] = $sh_TRANSACTION_MODE; $post_array['__GATEWAY_MODE__'] = "REDIRECT"; $post_array['__SITENAME__'] = "escortservice"; $post_array['__PURPOSE__'] = "ADD AD"; $post_array['__PRESENTATION_AMOUNT__'] = $payment; $post_array['__PAYEE_NAME__'] = $payee_name; $post_array['__REDIRECT_URL__'] = $SITE_URL."advertise-banner.php?msg=1"; $post_array['__RECORD_ID__'] = $_SESSION['SH_AD_ID']; $post_array['__PAYMENT_HANDLER_URL__'] = $SITE_URL."ad_payment_handler.php"; $payment_token = sh_get_token_from_array($post_array); header("Location: ".$paymet_gateway_url."?payment_token=".$payment_token); exit; function sh_get_token_from_array($array) { $json_data = json_encode($array); $encoded_data = base64_encode($json_data); $encreypted_data = gzdeflate($encoded_data, 9); $encoded_data = base64_encode($encreypted_data); $double_encoded_data = base64_encode($encoded_data); $token = $double_encoded_data; return $token; } ?>