View file stat/_modules/pay/result/index.php

File size: 664B
<?php
	require_once ( $_SERVER['DOCUMENT_ROOT']."/_core/system.php" );
	$SIGN = md5(FREE_ID.':'.$_REQUEST['AMOUNT'].':'.FREE_KEY.':'.$_REQUEST['MERCHANT_ORDER_ID']);
	if ($SIGN == $_REQUEST['SIGN']):
		$price =  $_REQUEST['us_day'] * PRICE;
		if ($price == $_REQUEST['AMOUNT']):
			if (cache_pf::ch($_REQUEST['us_id']) === true):	
				$gold = time() + 86400 * $_REQUEST['us_day'];
				DB :: $dbh -> query("UPDATE platforms SET gold = ? WHERE id = ? LIMIT 1;", array($gold,$_REQUEST['us_id']));	
				cache_pf::save($_REQUEST['us_id']);		
				die('YES');   	
			else: die('ERROR1'); endif;	
		else: die('ERROR2'); endif;
	else: die('ERROR3'); endif;
?>