<!-- #include file="con_shop.asp" -->
<!-- #include file="pay_md5.asp" -->
<%
	dim v_rcvname,v_rcvaddr,v_rcvtel,v_rcvpost,v_ordername,v_amount,v_email,v_remark,v_username,v_ymd,v_mid,key,v_oid,v_moneytype,v_orderstatus,v_url
    dim yy,mm,dd,xiaoshi,fenzhong,miao,BillNo,key_key,f
tit="在线支付表单确认"

call web_head(0,0,0,0,0)
call shop_load()
'----------------------------左边 开始----------------------------
call shop_left()
call shop_left_nsort(0)
'----------------------------左边 结束----------------------------
call web_center(0)
'----------------------------中间 开始----------------------------

call pay_true()

response.write ukong
'----------------------------中间 结束----------------------------
call web_end(0,0)

sub pay_true()


	'接收来自上页所有订单信息

 	
	
	v_rcvname=Request.Form("vname")
	v_rcvaddr=Request.Form("address")
	v_rcvtel=Request.Form("handphone")
	v_rcvpost=Request.Form("zip")
	v_ordername=Request.Form("vname")
	v_amount=Request.Form ("cash")
	v_email=Request.form("email")
	v_remark=Request.form("remark")
	v_username=Request.Form("username")
	v_ymd=Request.Form("shopname")
	
	
	'根据系统时间产生订单，格式：YYYYMMDD HHMMSS
	yy=year(date)
	mm=right("00"&month(date),2)
	dd=right("00"&day(date),2)
	'v_ymd=yy&mm&dd

	'生成订单号所有所需元素,格式为：小时，分钟，秒
	xiaoshi=right("00"&hour(time),2)
	fenzhong=right("00"&minute(time),2)
	miao=right("00"&second(time),2)

	'产生6位订单号BillNo
	BillNo=xiaoshi&fenzhong&miao

	'定义相关必要参数，如商户号、私钥、推荐的标准形式订单号、币种、配货状态、返回url地址
	v_mid = "26935"
	key = "ysvoid19821220yuelei"
	'以下v_oid为网银推荐标准订单号
	v_oid=v_ymd&"-"&v_mid&"-"&BillNo
	v_moneytype = "0" '0为rmb 1为dollor
	v_orderstatus = "0" '0未配齐 1为配齐
	v_url="http://221.204.4.33/pay_return_shop.asp" '譬如http://www.xxx.com/xxx.asp


dim iii,ooo
iii=split(v_amount,".")
if ubound(iii)=0 then
v_amount=cstr(v_amount) & ".00"
else
if len(iii(1))=1 then v_amount=cstr(iii(0)) & "." &cstr(iii(1)) & "0"
if len(iii(1))=2 then v_amount=cstr(v_amount)
if len(iii(1))>2 then v_amount=cstr(iii(0)) & "." & left(iii(1),2)
end if

yy=year(date)
mm=month(now)
if len(mm)=1 then mm="0"&mm
dd=day(Date)
if len(dd)=1 then dd="0"&dd
v_ymd=yy&mm&dd 
key_key = v_moneytype+v_ymd+v_amount+v_rcvtel+v_oid+v_mid+v_url+key
'拼凑串里勿使用中文字符，目前MD5在ASP、asp.net、java等环境下对中文处理有偏差现象
f=Ucase(trim(md5(key_key)))
'md5.asp文件中，LCase是将字符转换为小写; Ucase是将字符转换为大写
'网银支付平台对MD5值只认大写字符串，所以小写的MD5值得转换为大写

%>
<table cellspacing=1 cellpadding=4 class=table>
<tr><td class=td align=center colspan="2"><b><%response.write tit%>  请您确认您的信息</b></td>
</tr>
<tr class=bg_td>
<td width=20%>收货人姓名：</td>
<td><%=v_rcvname%> </td>
</tr>
<tr class=bg_td>
<td>收货人地址：</td>
<td><%=v_rcvaddr%> </td>
</tr>
<tr class=bg_td>
<td>收货人电话：</td>
<td><%=v_rcvtel%> </td>
</tr>
<tr class=bg_td>
<td>收货人邮编：</td>
<td><%=v_rcvpost%> </td>
</tr>
<tr class=bg_td>
<td>站点内呢称：</td>
<td><%=v_username%> </td>
</tr>
<tr class=bg_td>
<td>收货人邮箱：</td>
<td><%=v_email%></td>
</tr>
<tr class=bg_td>
<td height="100" align="left" valign="top">附加信息：</td>
<td valign="top"><%=v_remark%></td>
</tr>
<tr class=bg_td>
<td colspan=2><hr align="center" width="100%" size="1">    
<p>您的支付金额为:<span style="font-size: 24px; color: #FF0000; font-weight: bold"><%=v_amount%></span>&nbsp;元</p>
<p>您的支付编号为:<font color=red><%=v_oid%></font></p></td>
</tr>
<tr class=bg_td>
<td colspan=2><p>如果以上资料正确，请您前往电子商城交费。</td>
</tr>
<form method="post" action="https://pay.chinaebank.cn/select_bank.jsp" name="E_FORM" target=new>
<tr class=bg_td><td colspan=2 align="center">
    <input type=submit name=v_action value="网银电子商城网上安全支付平台">
    <input type="button" name="button1" onclick="javascript:;window.history(-1)" value="返回">
</td></tr>
	<input type="hidden" name="v_md5info" size="100"  value="<%=f%>">
	<input type="hidden" name="v_mid" value="<%=v_mid%>">
	<input type="hidden" name="v_oid" value="<%=v_oid%>">
	<input type="hidden" name="v_rcvname" value="<%=v_rcvname%>">
	<input type="hidden" name="v_rcvaddr" value="<%=v_rcvaddr%>">
	<input type="hidden" name="v_rcvtel" value="<%=v_rcvtel%>">
	<input type="hidden" name="v_ymd" value="<%=v_ymd%>">
	<input type="hidden" name="v_rcvpost" value="<%=v_rcvpost%>">
	<input type="hidden" name="v_amount" value="<%=v_amount%>">
	<input type="hidden" name="v_orderemail" value="<%=v_email%>">
	<input type="hidden" name="v_orderstatus"  value="<%=v_orderstatus%>">
	<input type="hidden" name="v_ordername"  value="<%=v_ordername%>">
	<input type="hidden" name="v_moneytype"  value="<%=v_moneytype%>">
	<input type="hidden" name="v_url" value="<%=v_url%>">
</form>
</table>
<%
end sub
%>