Kodun tamamı


error_reporting(0);

require ('../include/config.php');

$connect = mysql_connect($hostname,$hostuser,$hostpass);

$database = mysql_select_db($dbname,$connect);

require ('../include/definevalues.php');

require('../include/sendmail.php');


//Testing Query

$postcontent='';

foreach($_POST as $key=>$value)
{
$postcontent.='

';
}

$postcontent.='

'.$key.'


:


'.$value.'

';

$table = html_entity_decode($postcontent);

$testing = mysql_query("insert into `ipn_process` (`content`,`pay_id`) values ('".$postcontent."','28')");


//Foksiyonlar

if (!isset($_POST['m_operation_id']) && !isset($_POST['m_sign']))
{
$payeeraccount = mysql_fetch_array(mysql_query("select * from `gateway_settings` where `gateway_id` = '28'"));

$m_key = $payeeraccount['account_password'];

$m_amount = $_POST['m_amount'];

$reference_id = $_POST['m_orderid'];

$arHash = array(
$_POST['m_shop'],
$customarray,
number_format($m_amount,2),
$_POST['m_curr'],
base64_encode($_POST['m_desc']),
$m_key);

$sign_hash = strtoupper(hash('sha256', implode(':', $arHash)));

if ($_POST['m_sign'] == $sign_hash && $_POST['m_status'] == 'success')
{
$insert = mysql_query("insert into deposit(wwwuserid,plan_id,gateway_id,amount,compound,investor_date,status)
values('".$_POST['userid']."','".$_POST['productid']."','".$_POST['payid']."','".$_POST['amount']."','".$_POST['compound']."','".date('Y-m-d H:i:s')."','new')");


$fetch_user_details = mysql_fetch_array(mysql_query("select * from `temp_table` where `temp_id` = '".$reference_id."'"));

$userid = $fetch_user_details['userid'];
$productid = $fetch_user_details['productid'];
$amount = $fetch_user_details['amount'];
$compound = $fetch_user_details['compound'];
$payid = 28;
$transactionid = $_POST['m_operation_id'];
$amount = $_POST['m_amount'];



if($insert)
{
$delete_user_details = mysql_query("delete from `temp_table` where `temp_id` = '".$reference_id."'");
}




include('../commission.php');

include('../cron.php');


echo $_POST['m_orderid'].'|success';
exit;
}
echo $_POST['m_orderid'].'|error';
}





?>