💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>微信支付</title> <!-- 引入jquery 文件> <body> <script> $(document).ready(function(){ callpay();   }); function jsApiCall() { WeixinJSBridge.invoke( 'getBrandWCPayRequest', <?php echo $config; ?>, function(res){ var pay_type = "{$pay_type}"; if(res.err_msg == "get_brand_wcpay_request:ok"){ alert('支付成功'); window.location = "{:url('members/orders/show',['id'=>$id])}"; }else{ //微信支付报错测试 // alert(res.err_code+res.err_desc+res.err_msg); // return false; alert('支付失败'); setTimeout(function(){ window.location = "{:url('members/orders/show',['id'=>$id])}"; },1000) } } ); } 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(); } } </script> </body> </html> ```