The minimum requirement for running this SDK
is PHP
version 5.4
. It is recommended to run on PHP7
for best performance.
Some interfaces of WeChat need to cache data locally, so write permissions are required for the directory.
We encourage everyone to use composer
to manage your third-party libraries to facilitate later update operations (especially interface classes).
Recently, access_token
often expires for no reason. SDK
has added failure status detection to automatically re-obtain access_token
and return the result.
This SDK
has been verified and tested by several online projects, and its reliability and stability are extremely high. You are welcome to fork
or star
this project.
Recommended new WeChat development tools
- WeChat service account, WeChat applet, WeChat payment, Alipay payment
- Gitee repository WeChatDevloper: https://gitee.com/zoujingli/WeChatDeveloper
- Github repository WeChatDeveloper: https://github.com/zoujingli/WeChatDeveloper
WeChat SDK development help and communication
Before doing WeChat development, you must first read the official WeChat documentation. This SDK is also packaged based on it.
Document link address : http://www.kancloud.cn/zoujingli/wechat-php-sdk
ThinkAdmin : https://github.com/zoujingli/ThinkAdmin
Development communication QQ group: 513350915 (new)
If it is helpful to you, you can sponsor and support the author, thank you!
Official interface document link
- Before using it, you need to open the development mode of your WeChat account. For detailed steps, please see the WeChat public platform interface usage instructions:
- WeChat public platform: http://mp.weixin.qq.com/wiki/
- WeChat enterprise platform: http://qydev.weixin.qq.com/wiki/
- WeChat open platform: https://open.weixin.qq.com/
- WeChat payment access document: https://mp.weixin.qq.com/cgi-bin/readtemplate?t=business/course2_tmpl&lang=zh_CN
- WeChat merchant platform: https://pay.weixin.qq.com
WeChat SDK
project source file hosting
- The SDK is an open source project. You can use it at any address without any restrictions. You are welcome
fork
the project. - Download SDK source code via Github
- Download SDK source code through OSChina
- Download the SDK source code through the Composer package management tool
WeChat SDK
packaging docking and functions
- Access verification (primary authority)
- Auto-reply (text, pictures, voice, video, music, graphics) (Elementary permission)
- Menu operations (query, create, delete) (menu permissions)
- Customer service messages (text, pictures, voice, video, music, graphics) (authentication authority)
- QR code (create temporary and permanent QR code, obtain QR code URL) (service number, authentication authority)
- Long link to short link interface (service account, authentication authority)
- Tag operations (query, create, modify, move users to tags) (authentication authority)
- Web page authorization (basic authorization, user information authorization) (service account, authentication authority)
- User information (query basic user information, obtain follower list) (authentication authority)
- Multiple customer service functions (customer service management, obtaining customer service records, customer service session management) (authentication authority)
- Media files (upload, obtain) (authentication authority)
- Advanced mass messaging (authentication authority)
- Template message (set industry, add template, send template message) (service account, authentication authority)
- Card and coupon management (creation, modification, deletion, issuance, store management, etc.) (authentication authority)
- Semantic understanding (service account, authentication authority)
- Get WeChat server IP list (primary authority)
- WeChat JSAPI authorization (obtain tickets, obtain signatures) (primary authority)
- Data statistics (users, images, texts, messages, interface analysis data) (authentication authority)
- WeChat payment (webpage payment, scan code payment, transaction refund, payment to fans) (certify service account and activate payment function)
Interface permission notes:
- Primary permissions: basic permissions, any normal public account has this permission
- Menu permissions: Normal service accounts and authenticated subscription accounts have this permission
- Authentication authority: divided into subscription account and service account authentication. If the prefix is service account, only the certified service account has this authority.
- Payment permission: Only certified service accounts can apply for this permission
WeChat open third-party platform --- (cases and documents are being compiled)
- Public account authorization service
- Official account push message processing
- Public account basic business processing
- Public account payment agent initiation
Copyright statement
wechat-php-sdk is released under the MIT open source license and is available for free.
The copyright information of the third-party source code and binary files included in this project will be separately marked, please check it in the corresponding file.
Copyright Copyright © 2014-2023 by ThinkAdmin (https://thinkadmin.top) All rights reserved.