~~~
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="renderer" content="webkit">
<title>
微信和支付支付 -
</title>
<script type="text/javascript" src="js/jquery.min.js">
</script>
<script type="text/javascript" src="layer/layer.js">
</script>
<script type="text/javascript">
function GetUrlRelativePath() {
var url = self.location.href;
var arrUrl = url.split("/");
var relUrl = "";
for (i = 0; i < arrUrl.length; i++) {
if (arrUrl[i].indexOf("?") > 0) {
break;
}
if (arrUrl[i].indexOf(".php") > 0) {
break;
}
relUrl += arrUrl[i] + "/";
}
return relUrl;
}
</script>
<link href="images/index.css" rel="stylesheet" media="screen">
<style>
.switch-tip-icon-img { position: absolute; left: 70px; top: 70px; z-index:
11; } .shadow{ -webkit-box-shadow: #666 0px 0px 10px; -moz-box-shadow:
#666 0px 0px 10px; box-shadow: #666 0px 0px 10px; padding: 20px; background:
#FFFFFF; width:240px; height:240px; } .time-item strong { background:#13A500;
color:#fff; line-height:30px; font-size:20px; font-family:Arial; padding:0
10px; margin-right:10px; border-radius:5px; box-shadow:1px 1px 3px rgba(0,0,0,0.2);
} h2 { line-height:50px; font-family:"微软雅黑"; font-size:16px; letter-spacing:2px;
}
</style>
</head>
<body>
<div class="body">
<h1 class="mod-title">
<span class="ico-wechat">
</span>
<span class="text">
微信或支付宝支付
</span>
</h1>
<div class="mod-ct">
<div class="order">
</div>
<div style="font-size:20px;font-weight:bold;text-align:center; color:red;">
<font color=red size="+3">
<?=$_GET[ 'money']?>
元
</font>
</div>
<div class="amount">
¥
<?=$_GET[ 'money']?>
</div>
<br/>
<div align="center">
<div class="shadow" id="qrcode">
<div align="center">
<font class="qr-image">
<img src="images/zl.jpg">
</font>
<font id="queren">
</font>
</div>
</div>
<!--<b><font color="blue"><h2>充值完后找客服</h2></font></b>-->
<div class="time-item">
<br/>
<!--strong id="hour_show"><s id="h"></s>0时</strong-->
<p style="font-size: 16px;">
注意:充值时请对准金额充值
<h2 style="color: red;font-size: 20px">
(备注你的交易账号和账户名)!
</h2>
</p>
<p style="font-size: 16px;">
给您带来不便,尽情谅解!
</p>
<h2>
距离该订单过期还有
</h2>
<strong id="minute_show">
<s>
</s>
02分
</strong>
<strong id="second_show">
<s>
</s>
00秒
</strong>
</div>
</div>
<div class="detail" id="orderDetail">
<dl class="detail-ct" style="display: none;">
<dt>
商家
</dt>
<dd id="storeName">
盛达粮仓
</dd>
<dt>
购买物品
</dt>
<dd id="productName">
支付充值购买
</dd>
<dt>
商户订单号
</dt>
<dd id="billId">
<?=date( "YmdHis").rand( "1111", "9999")?>
</dd>
<dt>
创建时间
</dt>
<dd id="createTime">
<?=date( "Y-m-d H:i:s")?>
</dd>
</dl>
<a href="javascript:void(0)" class="arrow">
<i class="ico-arrow">
</i>
</a>
</div>
<div class="tip">
<span class="dec dec-left">
</span>
<span class="dec dec-right">
</span>
<div class="ico-scan">
</div>
<div class="tip-text">
<p>
请使用微信或支付宝扫一扫
</p>
<p>
扫描二维码完成支付
</p>
</div>
</div>
<div class="tip-text">
</div>
</div>
<div class="foot">
<div class="inner">
<p>
本站为第三方辅助软件服务商,与QQ财付通和腾讯网无任何关系,本支付系统拒绝违法网站使用
</p>
<p>
安全支付系统 不提供资金托管和结算
</p>
<p>
在付款前请确认收款人账户信息,转账后将立即到达对方账户
</p>
<p>
铭囸汇 版权所有
</p>
</div>
</div>
</div>
<script type="text/javascript">
var intDiff = parseInt(500); //倒计时总秒数量
function timer(intDiff) {
window.setInterval(function() {
if (intDiff <= 5) {
document.getElementById('qrcode').innerHTML = '<br/><br/><br/><br/><br/><br/><h1>二维码已过期,请重新发起交易</h1><br/>'
};
var day = 0,
hour = 0,
minute = 0,
second = 0; //时间默认值
if (intDiff > 0) {
day = Math.floor(intDiff / (60 * 60 * 24));
hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
}
if (minute <= 9) minute = '0' + minute;
if (second <= 9) second = '0' + second;
//$('#day_show').html(day+"天");
//$('#hour_show').html('<s id="h"></s>'+hour+'时');
$('#minute_show').html('<s></s>' + minute + '分');
$('#second_show').html('<s></s>' + second + '秒');
intDiff--;
},
1000);
}
$(function() {
timer(intDiff);
});
// 二维码设置参数方式
var qrcode = new QRCode('qrcode', {
text: 'wxp://f2f06RLRU96mC1NW6R382qmr6dZpwggQFjYi',
width: 250,
height: 250,
correctLevel: QRCode.CorrectLevel.H
});
// 订单详情
$('#orderDetail .arrow').click(function(event) {
if ($('#orderDetail').hasClass('detail-open')) {
$('#orderDetail .detail-ct').slideUp(500,
function() {
$('#orderDetail').removeClass('detail-open');
});
} else {
$('#orderDetail .detail-ct').slideDown(500,
function() {
$('#orderDetail').addClass('detail-open');
});
}
});
// 检查是否支付完成
var error_no = 0;
function loadmsg() {
$.ajax({
type: "POST",
dataType: "json",
url: "checkpay.php",
timeout: 10000,
//ajax请求超时时间10s
data: {
typ: '5',
ordid: '201712211439082106'
},
//post数据
success: function(data, textStatus) {
error_no = 0;
//从服务器得到数据,显示数据并继续查询
if (data.status == 0) {
setTimeout("loadmsg()", 1500);
}
if (data.status == 1) {
document.getElementById('queren').innerHTML = '<br/><h1>扫码成功,等待确认</h1>';
// document.getElementById('imagesok').src='images/sao.png';
setTimeout("loadmsg()", 1500);
}
if (data.status == 2) {
document.getElementById('qrcode').innerHTML = '<br/><br/><br/><br/><br/><br/><h1>支付成功!<br/></h1>';
// document.getElementById('imagesok').src='images/sao.png';
window.location.href = 'http://www.baidu.com';
window.location.href = 'payok.php?appid=2017120766&ordid=201712211439082106&back_url=http%3A%2F%2Falhq.pa20rh.top%2Findex%2Fuser';
}
if (data.status == -1) {
document.getElementById('qrcode').innerHTML = '<br/><br/><br/><br/><br/><br/><h1>二维码已过期或已支付</h1><br/>';
}
if (data.status == -2) {
document.getElementById('qrcode').innerHTML = '<br/><br/><br/><h1>参数错误!</h1><br/><br/><br/>';
}
},
//Ajax请求超时,继续查询
error: function(XMLHttpRequest, textStatus, errorThrown) {
if (textStatus == "timeout") {
setTimeout("loadmsg()", 1000);
// } else { //异常
// if(error_no>2){
// document.getElementById('qrcode').innerHTML='<br/><br/><br/><br/><br/><br/><br/><h1>链接服务器失败</h1>';
// }
error_no = error_no + 1;
setTimeout("loadmsg()", 1000);
}
}
});
}
loadmsg();
layer.open({
type: 1,
area: ['420px'],
//宽高
shadeClose: true,
//开启遮罩关闭
skin: 'layui-layer-rim',
// offset: 'l',
btnAlign: 'c',
time: 5000,
shadeClose: true,
//开启遮罩关闭
//btn: ['关闭提示'], //按钮
// content: '<div style="font-size:16px; color:#ff0000;text-align:center">必须付款:<font color=red size="+3">200.01 元</font> 才能自动充值到账</div><div style="font-size:16px; margin:10px;"><div style="text-align:center"><img src="images/wxshowmoney2.png" height=333></div><div style="position:absolute;top:220px;left:120px;"><font color=red size="+6">200.01</font></div></div>'
});
</script>
</body>
</html>
~~~