ecshop增加pc扫描二维码微信支付功能代码

 时间:2024-10-14 23:32:38

1、使用PHP QR Code生成二维码,下载,在商品支付页面加入include 'phpqrcode/phpqrcode.php';$pay_url ='http://www.xxx.com/weixin/weixin.php?order_id='.$order['order_sn']; QRcode::png($pay_url, 'images/image.png', 'L', 8); echo '<img src="images/image.png" />';生成一个指向微信支付的手机连接二维码,手机扫描进入

ecshop增加pc扫描二维码微信支付功能代码

3、手机打开页面调用代码<html><head> <meta http-equiv="content幻腾寂埒-type" content="text/html;charset=utf-8"/> <title>微信安全支付</title> <script type="text/javascript"> //调用微信JS api 支付 function jsApiCall() { WeixinJSBridge.invoke( 'getBrandWCPayRequest', <?php echo $jsApiParameters; ?>, function(res){ WeixinJSBridge.log(res.err_msg); //alert(res.err_code+res.err_desc+res.err_msg); } ); } 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(); } } callpay(); </script></head><body> </br></br></br></br> </body></html>

ecshop增加pc扫描二维码微信支付功能代码

5、找到notify_url.php文件上面添加define('IN_ECS', true);require('../includes/init.php');require('../includes/lib_payment.php');调用订单信息

ecshop增加pc扫描二维码微信支付功能代码

7、更多安全信息和详细信息就不列举了

  • 奥特AT3051DP智能差压变送器说明书
  • 如何召开高品质的会议
  • LONGTEC TR700-LF失重称控制模块使用说明书:[4]
  • 丹纳赫S200伺服驱动器说明书:[1]
  • 海鲜虾粥的做法
  • 热门搜索
    裸辞是什么意思 竖中指是什么意思 失望的反义词是什么 梦到鬼是什么意思 责任是什么 疫情什么时候结束 19朵玫瑰代表什么意思 阿胶什么时候吃最好 人的本质是什么 凤凰单枞属于什么茶