In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-12-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you how to initiate WeChat Pay in the development of Mini Program. The content is simple and clear. I hope it can help you solve your doubts. Next, let the editor take you to study and learn the article "how to initiate WeChat Pay in the development of Mini Program".
Initiated WeChat Pay.
Object parameter description:
The required parameter type indicates that timeStampString is the number of seconds in time stamp from 00:00:00 on January 1, 1970, that is, the current time nonceStrString is a random string with a length of less than 32 characters. PackageString is the prepay_id parameter value returned by the API for issuing orders. For example, prepay_id=*signTypeString is a signature algorithm. MD5paySignString is supported as a signature. For more information on the signature scheme, please see the Mini Program payment API documentation. SuccessFunction No API calls successful callback function failFunction No API calls failed callback function completeFunction No API calls the finished callback function (both successful and failed calls will be executed)
For more information, please check the WeChat Pay API documentation.
Callback result:
Callback type errMsg indicates that successrequestPayment:ok call payment succeeded failrequestPayment:fail cancel user canceled payment failrequestPayment:fail (detail message) call failed, where detail message is the detailed reason for the failure returned by the backend
Sample code:
Wx.requestPayment ({'timeStamp':', 'nonceStr':', 'package':', 'signType':' MD5', 'paySign':', 'success':function (res) {},' fail':function (res) {}) Bug & Tip
Bug: in versions 6.5.2 and earlier, canceling payment by a user does not trigger a fail callback, but only a complete callback. The callback errMsg is' requestPayment:cancel'.
What is the advantage of Mini Program Mini Program compared with developers, Mini Program is less difficult to develop, can save development and operating costs, so that developers can quickly develop a Mini Program. And Mini Program can be easily obtained and spread in Wechat, which can meet the basic life applications, in line with life services offline stores and non-rigid needs of low-frequency applications. For users, it can save time cost and mobile phone memory space, and have excellent use experience at the same time.
The above is about "how to initiate WeChat Pay in Mini Program development". If this article is helpful to you and think it is well written, please share it with your friends to learn new knowledge. if you want to know more about it, please pay more attention to the industry information channel.
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.