微信支付JSAPI, WeixinJSBridge.invoke 函数执行,报错 err_msg: getBrandWCPayRequest:fail_no permission to execute 求具体指导,wx:z15030610683
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": appId, //公众号ID,由商户传入
"timeStamp": timestamp, //时间戳,自1970年以来的秒数
"nonceStr": noncestr, //随机串
"package": package1,
"signType": signType, //微信签名方式:
"paySign": paySign //微信签名
},
function (res) {
console.log(JSON.stringify(res))
if (res.err_msg == "get_brand_wcpay_request:ok") {
console.log("成功支付")
//window.location.href="https://suyq.systoon.com/suzhoutoon-jewelry/m/index.html#/tips?flag=true"
} else if (res.err_msg == "get_brand_wcpay_request:fail") {
console.log("支付失败")
// window.location.href="https://suyq.systoon.com/suzhoutoon-jewelry/m/index.html#/tips?flag=false"
} else {
console.log("取消支付")
}
}
);