<?php
require_once("yun.config.php");
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>支付跳转中...</title>
</head>
<?php
if($_GET['id']==''){
	echo tiao('你的操作有误！','/');
}else{
	$cm->query("select * from phome_ecms_download where id='".$_GET['id']."'");
	$p = $cm->fetch_array($rs);
	
}
if($p['id']==''){
	echo tiao('你的操作有误！','/');
}else{
	$myorders=date('YmdHis',time()).rand(100,999);
	$date=array(
			'o_orderid'=>$myorders,
			'o_title'=>$p['title'],
			'o_pid'=>$p['id'],
			'o_price'=>floor($p['pprice']),
			'o_times'=>time(),
			'o_zt'=>'0'
);
	$cm->cmadd($date,'phome_order');
require_once("lib/yun_md5.function.php");
/**************************请求参数**************************/

        //商户订单号
        $out_trade_no = $myorders;//商户网站订单系统中唯一订单号，必填

        //订单名称
        $subject = $p['title'];//必填

        //付款金额
        $total_fee = floor($p['pprice']);//必填 需为整数

        //订单描述

        $body = $p['title'];

       


/************************************************************/

//构造要请求的参数数组，无需改动
$parameter = array(
		"partner" => trim($yun_config['partner']),
		"seller_email"	=> $seller_email,
		"out_trade_no"	=> $out_trade_no,
		"subject"	=> $subject,
		"total_fee"	=> $total_fee,
		"body"	=> $body
);

//建立请求

$html_text = i2e($parameter, "支付进行中...");
echo $html_text;

}
?>
</body>
</html>