<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<title>微信支付</title>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
</head>
<body>
<script>
//调用微信JS api 支付
function jsApiCall()
{
WeixinJSBridge.invoke(
"getBrandWCPayRequest",
{$parms},
//下面是支付完成后的回调,可以直接提示成功
function(res) {
if(res.err_msg == "get_brand_wcpay_request:ok") {
location.href = "{$success_url}";
}else if(res.err_msg == "get_brand_wcpay_request:cancel"){
// history.back();
location.href = "{$fail_url}";
}else{
alert("weixin return:" + JSON.stringify(res));
// alert(res.err_msg+" 参数有误,请返回!");
// history.back();
location.href = "{$fail_url}";
}
}
);
}
function callpay()
{
if (typeof WeixinJSBridge == "undefined"){
if( document.addEventListener ){
document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
}else if (document.attachEvent){
document.attachEvent('WeixinJSBridgeReady', jsApiCall);
document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
}
}else{
jsApiCall();
}
}
callpay();
</script>
</body>
</html>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有