当前位置:网站首页>5 minutes to achieve wechat cloud applet payment function (including source code)
5 minutes to achieve wechat cloud applet payment function (including source code)
2022-04-23 19:19:00 【"Technology makes customers"】
1 First on the renderings

Fast implementation of payment function , How fast ? Yes Five whips So fast , Don't build your own server , Don't buy domain name , Don't file domain names , No need to support https. Just a simple cloud function , You can easily realize the payment function of wechat applet
2 preparation
1, Non personal applets , Personal apps don't pay ( Applet appid)
2, The merchant number that has applied for wechat payment ( Merchant id, Merchant secret key ).
3, Connect your merchant ID in the app ( The app is bound with the merchant number )
4, Wechat app opens cloud development
3 Open the door
(1) Initialize the cloud development environment
(2) Create cloud functions pay
(3) Introduce third-party payment dependency tenpay
pay Folder right-click Select open at terminal , Installation dependency npm i tenpay
After installation , our pay There will be one more cloud function package.json file
(4) Write cloud functions
(5) Simply write a page and call the cloud function
Abnormal problems
-
Error: errCode: -404011 cloud function execution error
Because it wasn't uploaded and deployed , Right click the cloud function to upload and deploy -
Signature error
Wechat payment signature error
Source code
Official account 《 Source code trust Mart 》 reply payment Access to the source code
Author related articles
Decompile to get any wechat applet source code —— Just read this one
How to get the promotion link of meituan hungry to make money
版权声明
本文为["Technology makes customers"]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210559120957.html
边栏推荐
- JVM的类加载过程
- MySQL restores or rolls back data through binlog
- 2021-2022-2 ACM集训队每周程序设计竞赛(8)题解
- 2022.04.23(LC_714_买卖股票的最佳时机含手续费)
- NiO related Basics
- SSDB基础2
- redis优化系列(三)解决主从配置后的常见问题
- Summary of several relationships of UML class diagram
- Keysight has chosen what equipment to buy for you
- Sogou cell thesaurus analysis (only extract words and word frequency)
猜你喜欢
OpenHarmony开源开发者成长计划,寻找改变世界的开源新生力!
Client interns of a large factory share their experience face to face
Raspberry pie uses root operation, and the graphical interface uses its own file manager
Oracle配置st_geometry
FTP, SSH Remote Access and control
White screen processing method of fulter startup page
The fifth bullet of MySQL learning -- detailed explanation of transaction and its operation characteristics
mysql通过binlog恢复或回滚数据
Matlab 2019 installation of deep learning toolbox model for googlenet network
剑指 Offer II 116. 省份数量-空间复杂度O(n),时间复杂度O(n)
随机推荐
什么是消息队列
Some records used by VS2010
Pdf reference learning notes
SSDB基础
[play with lighthouse] Tencent cloud lightweight server builds a full platform video analysis video download website
Speculation on the way to realize the smooth drag preview of video editing software
【玩转Lighthouse】腾讯云轻量服务器搭建全平台视频解析视频下载网站
[report] Microsoft: application of deep learning methods in speech enhancement
Openlayers 5.0 reload the map when the map container size changes
C1000k TCP connection upper limit test 1
Strange problems in FrameLayout view hierarchy
Keysight has chosen what equipment to buy for you
The platinum library cannot search the debug process records of some projection devices
高层次人才一站式服务平台开发 人才综合服务平台系统
Oracle configuration st_ geometry
为何PostgreSQL即将超越SQL Server?
[record] typeerror: this getOptions is not a function
UML类图几种关系的总结
Transaction processing of SQL Server database
2022.04.23(LC_763_划分字母区间)