<?php 
//ini_set('date.timezone','Asia/Shanghai');


	require_once("db/db.php");	
	require_once("common/common.php");
	
	$intdotid = trim($_REQUEST['dotid']);	
	$price = trim($_REQUEST['price']);
	$orderno = trim($_REQUEST['orderno']);
	$wxorderno = trim($_REQUEST['wxorderno']);

	//1.更新数据库
	$sql = sprintf("UPDATE WX_Pay_List SET DoFlag=9 Where OrderNo='%s' And WXOrderNo='%s' And PriceVal=%s And DoFlag=0",$orderno, $wxorderno,$price);
	$result = querySql($sql);
	
	closeDb();

	
	//2.开始跳转页面
	if($intdotid=='1')
	{
		//alert("支付失败2");
		echo "<script>window.location.href='index.php';</script>";
	}
	else if($intdotid=='2')
	{
		$strurl='paysel.php?price='.$price.'&orderno='.$orderno;
		echo "<script>window.location.href='".$strurl."';</script>";
	}
	else if($intdotid=='3')
	{
		//alert("支付失败3");
		$strurl='paysel.php?price='.$price.'&orderno='.$orderno;
		echo "<script>window.location.href='".$strurl."';</script>";
	}
?>

