<!--{include file="<!--{$oetplpath}-->widget/block_header.tpl"}-->
<body class="bg_body">
<div class="bg_main w100per color_f">
  <div class="w1200">
    <div class="fl">
      <a href="<!--{$config.siteurl}-->"><img style="max-height: 85px;" src="<!--{$urlpath}--><!--{$config.logo}-->" /></a>
    </div>
    <div class="fl pl20 fz24 fb pt30">微信支付</div>
    <div class="clear"></div>
  </div>
</div>
 

<div class="w1200 bg_f br8 bsb pt50 plr50" style="margin-top: 40px;">
  <div class="plr50"> 
    <dl class="pr bo_bf7 pb20">
      <dt class="fb fz16">订单提交成功，请您尽快付款！ 订单号：<!--{$payorder.paynum}--></dt>
      <dd class="color_6 lh30">
        （<!--{$payorder.title}-->）
        请您尽快完成支付，否则订单会被取消哦！
      </dd>
      <dd class="pa rt pt20">应付金额<b class="fb fz24 color_f40"><!--{$payorder.amount}--></b>元</dd>
    </dl>
     
  </div>

  <div class="pt20 pb20 t_center">
    <p class="lh30 pt20 pb20">
      <i class="iconfont icon-weixinzhi fz30 color_green"></i>
    </p>
    <p class="p_2">
      <img src="<!--{$oefile}-->?c=pay&a=wxqrcode&size=6&wxpaycode=<!--{$wxpay_code|urlencode}-->&r=<!--{$time}-->"  />
    </p>
    <p class="pt10 pb20">
      使用微信扫一扫二维码支付
    </p>
  </div>

</div>
<!--{include file="<!--{$oetplpath}-->public/widget_footer.tpl"}-->

<script type="text/javascript">
$(function(){
    _reqPayResult();
});
//支付结果请求
function _reqPayResult() {
    $.ajax({
        type: "POST",
        url: "<!--{$oefile}-->?c=pay&a=checkpay",
        cache: false,
        data: {paynum:"<!--{$payorder.paynum}-->", r:get_rndnum(8)},
        dataType: "json",
        success: function($data) {
            $json = eval($data);
            $response = $json.response;
            $result = $json.result;
            if ($response == "1") {
                if ($result == "10") { //成功
                    window.location.href = "<!--{$oefile}-->?c=pay&a=show&paynum=<!--{$payorder.paynum}-->";
                }
                else if ($result == "11") { //失败
                    window.location.href = "<!--{$oefile}-->?c=pay&a=show&paynum=<!--{$payorder.paynum}-->";
                }
                else {
                    setTimeout(function(){
                      _reqPayResult();
                    }, 1000);
                }
            }
            else {

            }
        },
        error: function() {

        }
    });
}
</script>
</body>
</html>