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.

243 lines
7.8 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" style="padding-top: 100px;box-sizing: border-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="sdk_version" id="sdk_version" class="sdk_version" value="{$sdk_version}">
<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}">
<input type="hidden" name="aliapp" class="aliapp" value="{$aliapp}">
<input type="hidden" name="sqzfb" class="sqzfb" value="{$sqzfb}">
<input type="hidden" name="user_token" class="user_token" value="{$user_token}">
<input type="hidden" name="game_id" class="game_id" value="{$game_id}">
<!-- <div class="close" onclick="javascript:history.go(-1);">
<a href="javascript:">
<img src="__IMG__/callback/close.png">
</a>
</div> -->
<div id="toast" style="display: none;">
<div class="weui-mask_transparent"></div>
<div class="weui-toast" style="min-height: 0px;">
<!-- <i class="weui-icon-success-no-circle weui-icon_toast"></i> -->
<p class="weui-toast__content" style="margin:15px;"><span id="paytype">支付成功</span><br/><span style="font-size: .24rem;">2秒后将自动跳转</span></p>
</div>
</div>
<div class="wxicon" style="display: flex;flex-direction: column;justify-content: center; align-items: center;">
<img src="__IMG__/shortcut_payed.png">
<span style="font-size: 0.28rem; color:#FEB957;margin-top:0.3rem;">支付成功</span>
</div>
<div class="paydesc" style="margin-bottom: 2.4rem;">
<div>
<p id ="testn" style="text-align: center; font-size: 0.28rem;color:rgba(0,0,0,1);">您已充值平台币:</p>
<p style="text-align: center;font-size: 0.8rem; font-weight:500;font-family:PingFang SC;color:rgba(0,0,0,1);">¥{$price}</p>
<br/><br/>
<p/><br/>
</div>
</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%;background-color: #21B1EB; border-radius: 0.35rem; color: white;">
已完成付款
</a>
</div>
<!-- <div class="btn2">
<a id="payed1" data-order="{$pay_order_number}" href="javascript:" style="background:url('__IMG__/callback/btn2.png') no-repeat center center/100% 100%;">
跳成功
</a>
</div>
<div class="btn2">
<a id="payed2" 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 paycallback() {
$("#payed").click();
}
$(function() {
$(window).load( function(){
if ($(".gopay").val() == 1) {
if ($(".aliapp").val() == 1) {
var url = $(".gopay_url").val();
if ($('#sdk_version').val() == 0) {
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
if (isAndroid) {
window.txyxsdk.getZFBPay(url);
} else {
window.webkit.messageHandlers.noticeAppResult.postMessage(url);
}
} else if ($('#sdk_version').val() == 1) {
window.txyxsdk.getZFBPay(url);
} else {
window.webkit.messageHandlers.noticeAppResult.postMessage(url);
}
} else {
if ($(".gopay_url").val()) {
window.location.href = $(".gopay_url").val();
}
}
}
});
/* $("#payed1").click(function(){
var Scheme=$('.Scheme').val();
window.location.href = Scheme+"://1&back";
});
$("#payed2").click(function(){
var Scheme=$('.Scheme').val();
window.location.href = Scheme+"://0&back";
}); */
$("#payed").click(function() {
var orderno=$('.orderno').val();
var device=$('.device').val();
var Scheme=$('.Scheme').val();
var user_token = $('.user_token').val();
var game_id = $('.game_id').val();
$.ajax({
type: "post",
url: "/sdk.php/Spend/order_status",
dataType: "json",
data: {
'orderno' : orderno,
'user_token' : user_token,
'game_id' : game_id,
},
success: function(r) {
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
var isSafari = u.indexOf('Safari') > -1 || u.indexOf('safari') > -1; //android终端
if (r.type == "deposit") {
if (r.payStatus == '1') {
// 提示支付成功
$("#paytype").html("支付成功");
if (!isAndroid) {
if (isSafari) {
window.location.href = Scheme+"://1";
} else {
$("#toast").show();
setTimeout(function(){
window.location.href = r.url;
},2000)
}
/* try {
window.webkit.messageHandlers.exchangeResult.postMessage(1);
} catch(err) {
window.location.href = Scheme+"://1";
} */
}
} else {
// 提示支付失败
$("#paytype").html("支付失败");
if (!isAndroid) {
if (isSafari) {
window.location.href = Scheme+"://0";
} else {
$("#toast").show();
setTimeout(function(){
window.location.href = r.url;
},2000)
}
/* try {
window.webkit.messageHandlers.exchangeResult.postMessage(0);
// window.location.href = r.url;
} catch(err) {
window.location.href = Scheme+"://0";
} */
}
}
if (isAndroid) {
$("#toast").show();
setTimeout(function(){
window.location.href = r.url;
},2000)
}
}
if (r.type == "spend") {
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);
var url = $.trim(that.attr('data-url'));
if ($(".aliapp").val() == 1) {
if ($('#sdk_version').val() == 0) {
var u = navigator.userAgent;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
if (isAndroid) {
window.txyxsdk.getZFBPay(url);
} else {
window.webkit.messageHandlers.noticeAppResult.postMessage(url);
}
} else if ($('#sdk_version').val() == 1) {
window.txyxsdk.getZFBPay(url);
} else {
window.webkit.messageHandlers.noticeAppResult.postMessage(url);
}
} else {
window.location.href = url;
}
return false;
});
});
</script>
</html>