<!--#include file="../../inc/conn.asp"-->
<!--#include virtual="/inc/sitecon.asp"--> 
<!--#include file="md5.asp"-->
<%
 
z_partner=toparkey("ayapipartner") 
z_key=toparkey("ayapikey")
z_url=toparkey("ayapireturn")
z_nurl=toparkey("ayapinotify")

z_total_fee=trim(SafeRequestform("z_total_fee")) 				 '金额
z_trade_no=trim(SafeRequestform("z_trade_no")) 					 '订单号
z_body=trim(SafeRequestform("z_body"))         					 '扩展信息 原路返回
z_subject=trim(SafeRequestform("z_trade_no"))  					 '商品名称
z_show_url=zweburl 												 '演示地址
z_ip=Request.ServerVariables("LOCAL_ADDR")     					 '提交ip
z_bankid=trim(SafeRequestform("z_bankid"))      				 '银行代码
contact=trim(SafeRequestform("contact"))

signstr="z_partner="&z_partner&"&z_key="&z_key&"&z_trade_no="&z_trade_no&"&z_total_fee="&Formatnumber(z_total_fee,4,true,-1,0) 
z_sign=UCase(MD5(signstr))

z_url=replace(z_url,"{siteweb}",Request.ServerVariables("SERVER_NAME"))
z_nurl=replace(z_nurl,"{siteweb}",Request.ServerVariables("SERVER_NAME"))

'if z_fs=1 then urlact="action='"&trim(apijk)&"api161208/bank.asp' method=post"
if z_bankid="ALIPAY" then urlact="action='"&trim(apijk)&"api161208/alipay.asp' method=post"
'if z_fs=3 then urlact="action='"&trim(apijk)&"api161208/tenpay.asp' method=post"
if z_bankid="WEIXIN" then urlact="action='"&trim(apijk)&"api161208/weixin.asp' method=post"
if z_bankid="QQPAY" then urlact="action='"&trim(apijk)&"api161208/qq.asp' method=post"
%>
<body onLoad="document.form1.submit()">
<form <%=urlact%> name="form1" id="form1">
<input name="z_partner" type="hidden" value="<%=z_partner%>" />
<input name="z_url" type="hidden" value="<%=z_url%>" />
<input name="z_nurl" type="hidden" value="<%=z_nurl%>" />
<input name="z_total_fee" type="hidden" value="<%=z_total_fee%>" />
<input name="z_trade_no" type="hidden" value="<%=z_trade_no%>" />
<input name="z_body" type="hidden" value="<%=z_body%>" />
<input name="z_subject" type="hidden" value="<%=z_subject%>" />
<input name="z_show_url" type="hidden" value="<%=z_show_url%>" />
<input name="z_ip" type="hidden" value="<%=z_ip%>" />
<input name="z_bankid" type="hidden" value="<%=z_bankid%>" />
<input name="contact" type="hidden" value="<%=contact%>" />
<input name="z_sign" type="hidden" value="<%=z_sign%>" />
</form>