導航:首頁 > 編程語言 > weixinwxpay程序破解

weixinwxpay程序破解

發布時間:2025-08-06 03:05:51

『壹』 ecshop增加pc掃描二維碼微信支付功能代碼

ecshop開發網站,如果沒有手機版,又想通過微信支付,可以加入pc二維碼掃描微信支付功能
使用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" /'; 生成一個指向微信支付的手機連接二維碼,手機掃描進入

打開申請到的微信支付代碼,在上面加入weixin.php define('IN_ECS', true); require('../includes/init.php'); require('../includes/lib_order.php'); $order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0; $order = order_info(0,$order_id); 獲取訂單信息

手機打開頁面調用代碼 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

代碼引用WxPayPubHelper, WxPay.pub.config.php 配置文件 class WxPayConf_pub { //=======【基本信息設置】===================================== //微信公眾號身份的唯一標識。審核通過後,在微信發送的郵件中查看 const APPID = 'xxx'; //受理商ID,身份標識 const MCHID = 'xxx'; //商戶支付密鑰Key。審核通過後,在微信發送的郵件中查看 const KEY = 'xxx'; //JSAPI介面中獲取openid,審核後在公眾平台開啟開發模式後可查看 const APPSECRET = 'xxx'; //=======【JSAPI路徑設置】=================================== //獲取access_token過程中的跳轉uri,通過跳轉將code傳入jsapi支付頁面 const JS_API_CALL_URL = 'http://www.xxx.com/weixin/js_api_call.php'; //=======【證書路徑設置】===================================== //證書路徑,注意應該填寫絕對路徑 const SSLCERT_PATH = '/weixin/WxPayPubHelper/cacert/apiclient_cert.pem'; const SSLKEY_PATH = '/weixin/WxPayPubHelper/cacert/apiclient_key.pem'; //=======【非同步通知url設置】=================================== //非同步通知url,商戶根據實際開發過程設定 const NOTIFY_URL = 'http://www.xxx.com/weixin/notify_url.php'; //=======【curl超時設置】=================================== //本常式通過curl使用HTTP POST方法,此處可修改其超時時間,默認為30秒 const CURL_TIMEOUT = 30; } ? 根據申請的信息填寫

找到notify_url.php文件 上面添加 define('IN_ECS', true); require('../includes/init.php'); require('../includes/lib_payment.php'); 調用訂單信息

notify_url.php添加支付後修改訂單狀態 if($notify-checkSign() == TRUE) { if ($notify-data["return_code"] == "FAIL") { //此處應該更新一下訂單狀態,商戶自行增刪操作 //$log_-log_result($log_name,"【通信出錯】:\n".$xml."\n"); } elseif($notify-data["result_code"] == "FAIL"){ //此處應該更新一下訂單狀態,商戶自行增刪操作 //$log_-log_result($log_name,"【業務出錯】:\n".$xml."\n"); } else{ //此處應該更新一下訂單狀態,商戶自行增刪操作 //$log_-log_result($log_name,"【支付成功】:\n".$xml."\n"); $order = $notify-getData(); $log_id=get_order_id_by_sn($order["out_trade_no"]); order_paid($log_id); } //商戶自行增加處理流程, //例如:更新訂單狀態 //例如:資料庫操作 //例如:推送支付完成信息 }

更多安全信息和詳細信息就不列舉了

閱讀全文

與weixinwxpay程序破解相關的資料

熱點內容
模具cnc編程入門先學什麼 瀏覽:606
ug線切割編程如何顯示毛坯 瀏覽:349
葫蘆俠java版下載 瀏覽:989
裝系統大文件夾怎樣設置 瀏覽:282
51單片機匯編程序 瀏覽:237
word如何按首字母排序 瀏覽:927
蘋果手機照片顏色調節 瀏覽:289
z3740安卓系統 瀏覽:123
java文件圖標 瀏覽:22
升級92連不上無線 瀏覽:628
批量修改文件名為拼音 瀏覽:810
linux設備驅動程序第三版在線 瀏覽:502
ubuntu刪除目錄及下面文件 瀏覽:80
危機公關如何利用網路 瀏覽:355
施工圖招標文件內容 瀏覽:27
計算機網路技術項目化教程 瀏覽:228
買小學卷子什麼APP好 瀏覽:489
word偶數頁頁碼不同 瀏覽:968
weixinwxpay程序破解 瀏覽:474
如何提取文件夾中的指定圖片 瀏覽:106

友情鏈接