|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
|
<link rel="stylesheet" href="__CSS__/weui.mim.css">
|
|
|
|
|
<link rel="stylesheet" href="__CSS__/sdkptbpay.css">
|
|
|
|
|
<script src="__JS__/resize.js" type=""></script>
|
|
|
|
|
<title>支付回调</title>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
<div class="callback-box">
|
|
|
|
|
<input type="hidden" name="pay_order_number" class="orderno" value="{$orderno}">
|
|
|
|
|
<input type="hidden" name="Scheme" class="Scheme" value="{$Scheme}">
|
|
|
|
|
<input type="hidden" name="device" class="device" value="{$device}">
|
|
|
|
|
<input type="hidden" name="at_once" class="at_once" value="{$at_once}">
|
|
|
|
|
<input type="hidden" name="gopay_url" class="gopay_url" value="{$gopay_url}">
|
|
|
|
|
<input type="hidden" name="gopay" class="gopay" value="{$gopay}">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div class="close" onclick="javascript:history.go(-1);">
|
|
|
|
|
<a href="javascript:">
|
|
|
|
|
<img src="__IMG__/callback/close.png">
|
|
|
|
|
</a>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="wxicon">
|
|
|
|
|
<img src="__IMG__/pay/wxpay.png">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="paydesc">
|
|
|
|
|
<div>
|
|
|
|
|
<p>1、如果未打开微信客户端或者未完成付款,点击“继续付款”;<br/>2、如果您已完成,请点击“已完成付款”。</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn1">
|
|
|
|
|
<eq name="paytype" value="weixinpay">
|
|
|
|
|
<a href="{$gopay_url}" style="background:url('__IMG__/callback/btn1.png') no-repeat center center/100% 100%;">
|
|
|
|
|
继续支付</a>
|
|
|
|
|
|
|
|
|
|
</eq>
|
|
|
|
|
<eq name="paytype" value="alipay">
|
|
|
|
|
|
|
|
|
|
<a id="alipay" href="{$gopay_url}" style="background:url('__IMG__/callback/btn1.png') no-repeat center center/100% 100%;">
|
|
|
|
|
继续支付
|
|
|
|
|
</a>
|
|
|
|
|
</eq>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="btn2">
|
|
|
|
|
<a id="payed" data-order="{$pay_order_number}" href="javascript:" style="background:url('__IMG__/callback/btn2.png') no-repeat center center/100% 100%;">
|
|
|
|
|
已完成付款
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="whitesc"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
<script src="__JS__/jquery.min.js"></script>
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
$(window).load( function(){
|
|
|
|
|
if ($(".gopay").val() == 1) {
|
|
|
|
|
window.location.href = $(".gopay_url").val();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$("#payed").click(function() {
|
|
|
|
|
var orderno=$('.orderno').val();
|
|
|
|
|
var device=$('.device').val();
|
|
|
|
|
var Scheme=$('.Scheme').val();
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "post",
|
|
|
|
|
url: "/sdk.php/Spend/order_status",
|
|
|
|
|
dataType: "json",
|
|
|
|
|
data: {
|
|
|
|
|
'orderno' : orderno,
|
|
|
|
|
'user_token' : "{:I('user_token')}",
|
|
|
|
|
},
|
|
|
|
|
success: function(r) {
|
|
|
|
|
if (r.payStatus == '1') {
|
|
|
|
|
if (r.type == "deposit") {
|
|
|
|
|
confirm("支付成功");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (r.type == "deposit") {
|
|
|
|
|
window.location.href = r.url;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (r.type == "spend") {
|
|
|
|
|
var u = navigator.userAgent;
|
|
|
|
|
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
|
|
|
if (r.payStatus == '1') {
|
|
|
|
|
if (isAndroid) {
|
|
|
|
|
window.txyxsdk.getPayResult('succeed');
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
window.webkit.messageHandlers.exchangeResult.postMessage(1);
|
|
|
|
|
} catch(err) {
|
|
|
|
|
window.location.href = Scheme+"://1&back";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (isAndroid) {
|
|
|
|
|
window.txyxsdk.getPayResult('fail');
|
|
|
|
|
} else {
|
|
|
|
|
try {
|
|
|
|
|
window.webkit.messageHandlers.exchangeResult.postMessage(0);
|
|
|
|
|
} catch(err) {
|
|
|
|
|
window.location.href = Scheme+"://0&back";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#alipay').on('click',function() {
|
|
|
|
|
var that = $(this),url = $.trim(that.attr('data-url'));
|
|
|
|
|
if(that.hasClass('disabledbtn')){return false;}
|
|
|
|
|
that.addClass('disabled');
|
|
|
|
|
$.ajax({
|
|
|
|
|
type:'post',
|
|
|
|
|
dataType:'json',
|
|
|
|
|
data:{},
|
|
|
|
|
url:url,
|
|
|
|
|
success:function(result) {
|
|
|
|
|
if(result.code==200) {
|
|
|
|
|
var data = result.data;
|
|
|
|
|
if(data.wap==1) {
|
|
|
|
|
|
|
|
|
|
location.href = data.url;
|
|
|
|
|
|
|
|
|
|
} else if (data.wap==1) {
|
|
|
|
|
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if ($('#sdk_version').val() == 1)
|
|
|
|
|
window.txyxsdk.getZFBPay(data.url);
|
|
|
|
|
else
|
|
|
|
|
window.webkit.messageHandlers.noticeAppResult.postMessage(data.url);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
layer.open({
|
|
|
|
|
content: result.msg
|
|
|
|
|
,skin: 'msg'
|
|
|
|
|
,time: 2 //2秒后自动关闭
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},error:function() {
|
|
|
|
|
that.removeClass('disabledbtn');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</html>
|