作者:禹拇誓 | 来源:互联网 | 2023-01-29 17:12
微信内置浏览器支付onBridgeReady(data){#ifdefH5WeixinJSBridge.invoke('getBrandWCPayRequest'
// 微信内置浏览器支付
onBridgeReady(data){
// #ifdef H5
WeixinJSBridge.invoke('getBrandWCPayRequest', {
appId:data.appid,
timeStamp: String(data.timestamp),
nonceStr: data.noncestr,
package: data.package,
signType: data.signtype,
paySign: data.paysign, //微信签名
});
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(data), false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(data));
document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(data));
}
}
// #endif
},