电商收付通JSAPI支付成功后页面不跳转到指定页面
电商收付通JSAPI支付成功后页面不跳转到指定页面,为什么呀 function onBridgeReady(){ WeixinJSBridge.invoke( 'getBrandWCPayRequest', { "appId":"<?php echo $appid;?>", "timeStamp":"<?php echo $time;?>", "nonceStr":"<?php echo $nonce;?>", "package":"prepay_id=<?php echo $prepay_id;?>", "signType":"RSA", "paySign":"<?php echo $sign;?>" }, function(res){ if(res.err_msg == "get_brand_wcpay_request:ok" ) window.location.href="支付成功后的跳转链接"; else if(res.err_msg =="get_brand_wcpay_request:cancel") window.location.href="取消支付后的跳转链接"; else { alert('支付失败'); window.location.href="支付失败后的跳转链接"; } }); } 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(); }