$(function () { var clientType = '${clientType}'; if (clientType == '6') { function onBridgeReady() { WeixinJSBridge.invoke( 'getBrandWCPayRequest', { "appId": '${appId}', //公众号名称,由商户传入 "timeStamp": '${timeStamp}', //时间戳,自1970年以来的秒数 "nonceStr": '${nonceStr}', //随机串 "package": '${package}', "signType": '${signType}', //微信签名方式: "paySign": '${paySign}' //微信签名 }, function (res) { if (res.err_msg == "get_brand_wcpay_request:cancel" || res.err_msg == "get_brand_wcpay_request:fail" || res.err_msg == "requestPayment:fail cancel") { // 使用以上方式判断前端返回,微信团队郑重提示: //res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。 WeixinJSBridge.call('closeWindow'); } else { window.location.href = '${base}' + '/gateway/m/forwardPaytool?appId=' + '${app_id}'; } }); } if (typeof WeixinJSBridge == "undefined") { if (document.addEventListener) { document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false); } else if (document.attachEvent) { document.attachEvent('WeixinJSBridgeReady', onBridgeReady); document.attachEvent('onWeixinJSBridgeReady', onBridgeReady); } } else { onBridgeReady(); } } else { var isCodeUrl = '${isCodeUrl}'; if (isCodeUrl == '0') { window.location.href = '${jumpUrl}'; } else { $("#autoform").submit(); } } }); </script>
安卓支付提示打开浏览器下载,不能弹出支付输入密码页面 ios正常https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx031952e6f97ac130&redirect_uri=http%3A%2F%2Fwww.ygsjxx.cn%2Fgateway%2Fm%2FgetOpenid%3FclientIp%3D127.0.0.1%26paytoolCode%3Dwechat%26key%3DlbSYIaOqIHtyz2l3YwpDfcIJ8Um1Zagr%26secret%3Ddd82349e3c4b66bbb57044930d387183%26weChatOpenidUrl%3Dhttps%3A%2F%2Fapi.weixin.qq.com%2Fsns%2Foauth2%2Faccess_token%3Fappid%3Dwx031952e6f97ac130&response_type=code&scope=snsapi_base&state=123#wechat_redirect
2023-03-07