You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
5.2 KiB
HTML

<!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">
5 years ago
<input type="hidden" name="pay_order_number" class="orderno" value="{$orderno}">
<input type="hidden" name="Scheme" class="Scheme" value="{$Scheme}">
5 years ago
<input type="hidden" name="sdk_version" id="sdk_version" class="sdk_version" value="{$sdk_version}">
5 years ago
<input type="hidden" name="at_once" class="at_once" value="{$at_once}">
5 years ago
<input type="hidden" name="gopay_url" class="gopay_url" value='{$gopay_url}'>
5 years ago
<input type="hidden" name="gopay" class="gopay" value="{$gopay}">
5 years ago
<input type="hidden" name="aliapp" class="aliapp" value="{$aliapp}">
5 years ago
<input type="hidden" name="sqzfb" class="sqzfb" value="{$sqzfb}">
5 years ago
<input type="hidden" name="user_token" class="user_token" value="{$user_token}">
5 years ago
<!-- <div class="close" onclick="javascript:history.go(-1);">
<a href="javascript:">
<img src="__IMG__/callback/close.png">
</a>
</div> -->
<div class="wxicon" style="margin-top: 100px;">
5 years ago
<eq name="paytype" value="weixinpay">
<img src="__IMG__/wxpay2x.png">
5 years ago
<else />
5 years ago
<img src="__IMG__/alipay2x.png">
5 years ago
</eq>
</div>
<div class="paydesc">
<div>
5 years ago
<eq name="paytype" value="weixinpay">
<p>1、如果未打开微信客户端或者未完成付款点击“继续付款”<br/>2、如果您已完成请点击“已完成付款”。</p>
5 years ago
<else />
<p>1、如果未打开支付宝客户端或者未完成付款点击“继续付款”<br/>2、如果您已完成请点击“已完成付款”。</p>
</eq>
</div>
</div>
<div class="btn1">
5 years ago
<eq name="paytype" value="weixinpay">
5 years ago
<a href="{$gopay_url}" style="background:url('__IMG__/callback/btn1.png') no-repeat center center/100% 100%;">
5 years ago
继续支付</a>
5 years ago
</eq>
<eq name="paytype" value="alipay">
5 years ago
5 years ago
<a id="alipay" data-url='{$gopay_url}' style="background:url('__IMG__/callback/btn1.png') no-repeat center center/100% 100%;">
继续支付
</a>
5 years ago
</eq>
5 years ago
</div>
<div class="btn2">
5 years ago
<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>
5 years ago
function paycallback() {
$("#payed").click();
}
5 years ago
5 years ago
$(function() {
$(window).load( function(){
if ($(".gopay").val() == 1) {
5 years ago
if ($(".aliapp").val() == 1) {
if ($('#sdk_version').val() == 1) {
window.txyxsdk.getZFBPay($(".gopay_url").val());
} else {
window.webkit.messageHandlers.noticeAppResult.postMessage($(".gopay_url").val());
}
} else {
window.location.href = $(".gopay_url").val();
}
5 years ago
}
5 years ago
});
5 years ago
$("#payed").click(function() {
5 years ago
var orderno=$('.orderno').val();
var device=$('.device').val();
var Scheme=$('.Scheme').val();
5 years ago
var user_token = $('.user_token').val();
5 years ago
$.ajax({
type: "post",
url: "/sdk.php/Spend/order_status",
dataType: "json",
data: {
'orderno' : orderno,
5 years ago
'user_token' : user_token,
5 years ago
},
success: function(r) {
if (r.payStatus == '1') {
5 years ago
if (r.type == "deposit") {
confirm("支付成功");
}
5 years ago
} else {
}
5 years ago
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');
5 years ago
} else {
5 years ago
try {
window.webkit.messageHandlers.exchangeResult.postMessage(1);
5 years ago
} catch(err) {
5 years ago
window.location.href = Scheme+"://1&back";
}
5 years ago
}
} else {
if (isAndroid) {
window.txyxsdk.getPayResult('fail');
5 years ago
} else {
5 years ago
try {
window.webkit.messageHandlers.exchangeResult.postMessage(0);
5 years ago
} catch(err) {
5 years ago
window.location.href = Scheme+"://0&back";
}
5 years ago
}
}
}
5 years ago
}
});
});
5 years ago
5 years ago
$('#alipay').on('click',function() {
5 years ago
var that = $(this);
var url = $.trim(that.attr('data-url'));
if ($(".aliapp").val() == 1) {
if ($('#sdk_version').val() == 1) {
window.txyxsdk.getZFBPay(url);
} else {
window.webkit.messageHandlers.noticeAppResult.postMessage(url);
5 years ago
}
5 years ago
} else {
window.location.href = url;
}
5 years ago
return false;
});
5 years ago
});
</script>
</html>