<?php
\header("Content-type: text/html; charset=utf-8"); 
$path = $_SERVER['DOCUMENT_ROOT'];
//====================配置商户的宝付接口授权参数============================
require_once($path."/ew/Function/HttpClient.php");
require_once($path."/ew/Function/Log.php");
require_once($path."/ew/Function/Util.php");

Log::LogWirte("=================网关支付=====================");
//====================配置商户的宝付接口授权参数==============

$service = "online_pay";//online_pay，表示网上支付；
//$merchant_ID = "100000000001986";	//合作伙伴在华势的用户ID
$merchant_ID = "100000000004606";	//合作伙伴在华势的用户ID
//$key = "95ff8e3b2ff06eb4f894e46fb028ccedc8d2294e068632e810c10bg6adgegg05";	//终端号
$key = "becg0gd0c561a61bce4276b6427ec910d88e0ffab4f7cf3b5771105e3e50d0fb";
$charset = "UTF-8";//字符集
$sign_type = "MD5";//签名方式
$notify_url = "https://my.bmfn.cn/ewalletTrans.html";//页面跳转地址
$return_url = "https://my.bmfn.cn/";//服务器跳转地址
$Pay_url = "https://ebank.payworth.net/portal";
$Query_url="https://mapi.payworth.net/query/payment";

function get_orderno(){//生成时间戳
	return "ORDERNO".strtotime(date('Y-m-d H:i:s',time()));	
}
function rand4(){//生成四位随机数
	return rand(1000,9999);
}
function return_time(){//生成时间

	return date('YmdHis',time());
	
}