<?php
	session_start();
	
	require_once("db/db.php");	
	require_once("common/common.php");
	
	//设置统一语言格式
	header("Content-type: text/html; charset=gb2312"); 
	
	//微信支付成功后，调用此页面完成账单结账和付款入账
	$orderno = trim($_REQUEST['orderno']);
		
	//4.开始提交支付
	//@intDoType	INT,		--0会员账户,1会员积分,2电子券,3微信支付
	//@Sub_No	VARCHAR(14),
	//@Bill_No	VARCHAR(16)
	
	$strPayDoID = '2';
	
	$sql = sprintf("EXECUTE WXG_BillPayForDo %s,'%s',''", $strPayDoID,$orderno);
	if(executeSql($sql))
	{
		//支付成功返回到订单界面
		$strgourl = 'Location: orderlist.php?bstat=1';
	}
	else
	{
		//支付失败
		$strgourl = 'Location: ordermodify.php?selbillno'.$orderno;
	}
	closeDb();
	header($strgourl);	
?>



