<!--#include file="../../inc/payconn.asp"-->
<!--#include file="asp_md5.asp"-->
<%
	'mysp_billno = (request.QueryString("num"))
	mysp_billno = Session("L_Num")
	'total_fee= (request.QueryString("price"))
	total_fee= Session("L_PayPrice")
	sp_id = (request.QueryString("GetStr_wg"))
	PayID = (Request.QueryString("PayID"))

	If PayID = "" or mysp_billno ="" or total_fee="" or sp_id=""  Then
		Response.Write("缺少参数！")
		Response.End()
	End If

Call ConnectionDatabase()
Set Res = GrateRs("Select * From [L_pay] Where ptype='95588'",1)

'商户在互赢支付网关上的商户号
MerchantID=Res("sId")
'商户流水号
MerOrderNo = mysp_billno
'商品代码, 固定: 15
CardType = "15"
BankID = sp_id
Money = total_fee
'后台通知地址，商户系统后台接收互赢支付订单结果的地址
NoticeURL="http://"&Request.ServerVariables("HTTP_HOST")&"/Pay/95588_bank/receive.asp"
NoticePage="http://"&Request.ServerVariables("HTTP_HOST")&"/Pay/95588_bank/receive.asp"
'商户密钥，请登陆商户后台查询
key=Res("sKey")
Res.close
'组合字符串

sign_text =   MerchantID &  MerOrderNo &  CardType  & BankID &  NoticeURL &  Money & key

'response.Write(sign_text)
'response.End()


'生成MD5签名
'sign = UCase(MD5(sign_text))        ' 转换为大写

sign = MD5(sign_text)        

linkurl="http://42.120.42.22:9180/"
TOSPPost = linkurl&"busias/PayRequest?MerOrderNo="&MerOrderNo&"&MerchantID="&MerchantID&"&CardType="&CardType&"&BankID="&BankID&"&Money="&Money&"&NoticeURL="&NoticeURL&"&NoticePage="&NoticePage&"&sign="&sign


'response.Write(TOSPPost)
'response.End()
response.Redirect(TOSPPost)
%>

