<%@page contentType="text/html;charset=GBK" %>
<%@ taglib uri="/bean" prefix="bean" %>
<%@ taglib uri="/html" prefix="html" %>
<%@ taglib uri="/logic" prefix="logic" %>
<%@ taglib uri="/keyshop" prefix="keyshop" %>
<%@include file="/jsp/pub/pub.jsp"%>
<%
	//设置网页title, 关键字,网页描述。
	PAGETITLE = "订单成功页面" + PAGETITLE;
	PAGEDESCRIPTION =  PAGETITLE;
	PAGEKEYWORDS = PAGETITLE;
%>
<%@include file="/jsp/pub/top.jsp"%>
<jsp:useBean id="fgorderForm" class="com.keyshop.shop.order.controller.OrderForm" scope="request"/>
<%
	Order bean = (Order)fgorderForm.getBean();
%>
<%
	PayType payType = OrderHelper.getPayType(bean.getPayType());
	
	String returnUrl = (String)request.getAttribute("returnUrl");
	if(!StringUtil.isEmpty(returnUrl)) {
%>
<SCRIPT>
	
window.location = '<%=CONTEXT + returnUrl%>'
</SCRIPT>
<%
	}
%>
<SCRIPT language=JavaScript src="<%=CONTEXT%>/fg/js/pub.js"></SCRIPT>
<table width="640" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height=10></td>
  </tr>
</table>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" height="10"><img src="<%=CONTEXT%>/img/QQ/i01.gif" width="10" height="10"></td>
    <td  background="<%=CONTEXT%>/img/QQ/i03.gif"></td>
    <td width="10" height="10"><img src="<%=CONTEXT%>/img/QQ/i02.gif" width="10" height="10"></td>
  </tr>
  <tr>
    <td  background="<%=CONTEXT%>/img/QQ/i04.gif">&nbsp;</td>
    <td>
    	<!--内容填写处-->
<table width="531" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25" align="center" bgcolor="2B579E"><font color=white size=2><b>感谢您的订购！</b></font></td>
  </tr>
</table>
<table width="531" border="1" align="center" cellpadding="0" cellspacing="0" bordercolorlight="#D4D4D4" bordercolordark="white">
  <tr>
    <td align="center" bgcolor="f2f2f2"><p>&nbsp;</p>
    <p>订单确认您已经完成本次购物的全部过程，您的购物总额为<span class="Process02_product_navtext02"><%=bean.getTotalCost()%>元</span>，你的订单号为<a href="<%=CONTEXT%>/fg/order/order.do?actionType=fgview&bean.id=<%=bean.getId()%>" target="_blank"><font color="#FF0000"><%=bean.getSerialNo()%></font></a>, 请记住您的订单号以方便您以后查询,你选择的支付方式是 
	  <span class="Process02_product_navtext02"><%
	  	if(payType != null) {
	  		%>
	  			<%=payType.getName()%>
	  		<%
	  			}
	  		%>
	  </span>，随后我们的产品和服务将伴随您，欢迎您再次光临。<br>
    <p>&nbsp;</p>
    </td>
  </tr>
  <tr> 
  	<td align="center" bgcolor="f2f2f2">
  	<%
    	if(request.getAttribute("no_login_error") != null) { 
    %>
    <input type="button" onclick="javascript:gologin()" name="Submit32" value="登录网站" class="i04">
    <%
      	} else {
      %>
    <input type="button" onclick="javascript:window.location='<%=CONTEXT%>/index.jsp'" name="Submit322" value="继续购?" class="i04">
    <%
    	}
    %>
		<input type="button" onclick="javascript:logout()" name="sub" value="退出商城" class="i04">
	  </td>
  </tr>
  <tr>
  	<td align="center" bgcolor="f2f2f2">
    <%
    try {
			//首信网上支付	             
  		CapInfoPayInfo capInfo = (CapInfoPayInfo)request.getAttribute("capInfo");
  		if(capInfo != null) {
    %>
    <form name="capinfoform" method="post" action="http://pay.beijing.com.cn/prs/user_payment.checkit">
    	 <html:hidden property="channelId" value="<%=currentChannel.getId()%>"/>
			 <input type=hidden name=v_mid value="<%=capInfo.getVmid()%>"> 
			 <input type=hidden name=v_oid value="<%=capInfo.getOrderId()%>">
			 <input type=hidden name=v_rcvname value="<%=capInfo.getV_rcvname()%>"> 
			 <input type=hidden name=v_rcvaddr value="<%=capInfo.getV_rcvaddr()%>">
			 <input type=hidden name=v_rcvtel value="<%=capInfo.getV_rcvtel()%>">
			 <input type=hidden name=v_rcvpost value="<%=capInfo.getV_rcvpost()%>">
			 <input type=hidden name=v_amount value="<%=capInfo.getV_amount()%>">
			 <input type=hidden name=v_ymd value="<%=capInfo.getOrderDate()%>">
			 <input type=hidden name=v_orderstatus value="<%=capInfo.getV_orderstatus()%>">
			 <input type=hidden name=v_ordername value="<%=capInfo.getV_ordername()%>">
			 <input type=hidden name=v_moneytype value="<%=capInfo.getV_moneytype()%>">
			 <input type=hidden name=v_url value="<%=capInfo.getReturnUrl()%>">
			 <input type=hidden name=v_md5info value="<%=capInfo.getV_md5info()%>">
    	 <input type="button" onclick="javascript:document.capinfoform.submit()" name="sub" class="i04" 
    	 value="首信网上支付" class="i04">
		 </form>
       <%
        	}
        //网银支付
      		ChinabankInfoPayInfo chinabankInfo = (ChinabankInfoPayInfo)request.getAttribute("chinabankInfo");
      		if(chinabankInfo != null) {
       %>    
	    <form name="chinabankinfoform" method="post" action="https://pay.chinabank.com.cn/select_bank">
				 <input type=hidden name=v_mid value="<%=chinabankInfo.getV_mid()%>"> 
				 <input type=hidden name=v_oid value="<%=chinabankInfo.getV_oid()%>">
				 <input type=hidden name=v_rcvname value="<%=chinabankInfo.getV_rcvname()%>"> 
				 <input type=hidden name=v_rcvaddr value="<%=chinabankInfo.getV_rcvaddr()%>">
				 <input type=hidden name=v_rcvtel value="<%=chinabankInfo.getV_rcvtel()%>">
				 <input type=hidden name=v_rcvpost value="<%=chinabankInfo.getV_rcvpost()%>">
				 <input type=hidden name=v_amount value="<%=chinabankInfo.getV_amount()%>">
				 <input type=hidden name=v_ordername value="<%=chinabankInfo.getV_ordername()%>">
				 <input type=hidden name=v_moneytype value="<%=chinabankInfo.getV_moneytype()%>">
				 <input type=hidden name=v_url value="<%=chinabankInfo.getV_url()%>">
				 <input type=hidden name=v_md5info value="<%=chinabankInfo.getV_md5info()%>">
	    	 <input type="button" onclick="javascript:document.chinabankinfoform.submit()" name="sub" class="i04"
	    	  value="网银网上支付" class="i04">
			</form>
     <%
     //支付宝支付
     		}
    		AlipayInfoPayInfo alipayInfo = (AlipayInfoPayInfo)request.getAttribute("alipayInfo");
    		if(alipayInfo != null) {
     %>
	               
	    <form name="alipayinfoform" method="post" action="https://www.alipay.com/payto:<%=alipayInfo.getSeller()%>">
					<input type=hidden name=cmd value="<%=alipayInfo.getCmd()%>"> 
				 <input type=hidden name=subject value="<%=alipayInfo.getSubject()%>">
				 <input type=hidden name=body value="<%=alipayInfo.getBody()%>"> 
				 <input type=hidden name=order_no value="<%=alipayInfo.getOrder_no()%>">
				 <input type=hidden name=price value="<%=alipayInfo.getPrice()%>">
				 <input type=hidden name=ordinary_fee value="<%=alipayInfo.getOrdinary_fee()%>">
				 <input type=hidden name=express_fee value="<%=alipayInfo.getExpress_fee()%>">
				 <input type=hidden name=seller value="<%=alipayInfo.getSeller()%>">
				 <input type=hidden name=ac value="<%=alipayInfo.getAc()%>">
				 <input type=hidden name=partner value="2088002065646805">
	    	 <input type="button" onclick="javascript:document.alipayinfoform.submit()" class="i04" name="sub" 
	    	 value="支付宝" class="i04">
			</form>
       <%
       		}
       
       }catch(Exception e) {e.printStackTrace();}
       %> 
    </td>
  </tr> 
</table>
    </td>
    <td background="<%=CONTEXT%>/img/QQ/i05.gif"></td>
  </tr>
  <tr>
    <td width="10" height="10"><img src="<%=CONTEXT%>/img/QQ/i06.gif" width="10" height="10"></td>
    <td background="<%=CONTEXT%>/img/QQ/i08.gif"></td>
    <td width="10" height="10"><img src="<%=CONTEXT%>/img/QQ/i07.gif" width="10" height="10"></td>
  </tr>
</table>
<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20" align="center"></td>
  </tr>
</table>
<%@include file="/jsp/pub/bottom.jsp"%>