<!-- #include file="include/config.asp" -->
<!-- #include file="../include/pay_md5.asp" -->
<%

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,tmp1
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值得转换为大写


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