In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to achieve Thinkphp Wechat official account payment interface", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's ideas slowly in depth, together to study and learn "how to achieve Thinkphp Wechat official account payment interface" bar!
The details are as follows
The first step is to configure the two images in the folder to have the same path except for the domain name to be changed.
The second step is to put the Weixinpay folder in\ ThinkPHP\ Library\ Vendor and place the Weixinpay folder in this Vendor folder
The third step is to put WxJsAPIController.class.php in the php file\ Home\ Controller.
Step 4: put the WxJsAPI folder in the\ Home\ View folder
The fifth step successfully calls the official account payment function of Wechat.
JsApiCall.html
Wechat secure payment / / call Wechat JS api pay function jsApiCall () {WeixinJSBridge.invoke ('getBrandWCPayRequest', function (res) {WeixinJSBridge.log (res.err_msg); if (res.err_msg = = "get_brand_wcpay_request:ok") {/ / alert (res.err_code+res.err_desc+res.err_msg) / * write down what to do if the payment is successful * /} else {/ / return to jump to the order details page alert (payment failed);}}) } 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 ();}}
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.