PHPackages                             openforall/wechat-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. openforall/wechat-sdk

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

openforall/wechat-sdk
=====================

企业级微信API开发工具包 - PHP版 | Enterprise WeChat API Development Kit for PHP

v1.0.0(7mo ago)00MITPHPPHP &gt;=7.0

Since Dec 2Pushed 7mo agoCompare

[ Source](https://github.com/Openforall-team/wechat-sdk-php)[ Packagist](https://packagist.org/packages/openforall/wechat-sdk)[ Docs](https://openforall.liebianjun.com)[ RSS](/packages/openforall-wechat-sdk/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

OpenForAll 微信开发 SDK - PHP版
==========================

[](#openforall-微信开发-sdk---php版)

[![OpenForAll Logo](https://camo.githubusercontent.com/832b54d969788f9c582fb20f93b07afc9e5536bba304ed049809c4e4d55988f9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e466f72416c6c2d25453525424525414525453425424625413125453525424325383025453525384625393153444b2d626c7565)](https://camo.githubusercontent.com/832b54d969788f9c582fb20f93b07afc9e5536bba304ed049809c4e4d55988f9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e466f72416c6c2d25453525424525414525453425424625413125453525424325383025453525384625393153444b2d626c7565)[![PHP Version](https://camo.githubusercontent.com/33e34b87a65db9a9c4330ae1ee79ee3b653853fc7530d25db0dc7672ef01772f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e302d3838393242462e737667)](https://www.php.net/)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![GitHub Stars](https://camo.githubusercontent.com/a08de204e85f57e850ca84922d3428f9c3dcabc7c039b192858c87fec1af4c41/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6f70656e666f72616c6c2f7765636861742d73646b2d7068702e737667)](https://github.com/openforall/wechat-sdk-php/stargazers)[![GitHub Issues](https://camo.githubusercontent.com/7164bb4b05ed18308ffcce72cb5f594c82fc89fb7494683c412c8063d41a7d3e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6f70656e666f72616c6c2f7765636861742d73646b2d7068702e737667)](https://github.com/openforall/wechat-sdk-php/issues)

**🚀 企业级微信API开发工具包 | 5分钟快速接入 | 开箱即用**

[快速开始](#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B) • [在线演示](https://openforall.liebianjun.com/sdk/php/demo/) • [完整文档](https://openforall.liebianjun.com/docs) • [API参考](#api%E6%96%87%E6%A1%A3)

---

✨ 核心特性
------

[](#-核心特性)

### 🎯 功能全面

[](#-功能全面)

- ✅ **微信支付** - 扫码支付、公众号支付、APP支付、H5支付
- ✅ **微信授权** - OAuth2.0授权登录、用户信息获取
- ✅ **微信红包** - 现金红包、裂变红包、企业付款
- ✅ **用户管理** - 注册、登录、资料管理、权限控制
- ✅ **支付宝支付** - PC支付、手机支付、扫码支付
- ✅ **短信验证** - 阿里云、腾讯云短信接口
- ✅ **邮件服务** - 验证码、通知邮件
- ✅ **文件上传** - 图片、文档、视频上传

### 🔒 安全可靠

[](#-安全可靠)

- 🛡️ **金融级安全** - 签名验证、加密传输、防重放攻击
- 🔐 **权限控制** - 基于角色的访问控制(RBAC)
- 📝 **完整日志** - 操作日志、错误日志、审计日志
- ⚡ **高性能** - 连接池、缓存优化、异步处理

### 📦 开箱即用

[](#-开箱即用)

- 🚀 **5分钟接入** - 简单配置即可使用
- 📖 **详细文档** - 完整的API文档和示例代码
- 🎨 **在线演示** - 可视化功能演示和测试工具
- 🔧 **易于扩展** - 模块化设计，支持自定义扩展

---

📋 目录
----

[](#-目录)

- [系统要求](#%E7%B3%BB%E7%BB%9F%E8%A6%81%E6%B1%82)
- [快速开始](#%E5%BF%AB%E9%80%9F%E5%BC%80%E5%A7%8B)
- [安装方式](#%E5%AE%89%E8%A3%85%E6%96%B9%E5%BC%8F)
- [配置说明](#%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E)
- [使用示例](#%E4%BD%BF%E7%94%A8%E7%A4%BA%E4%BE%8B)
- [API文档](#api%E6%96%87%E6%A1%A3)
- [在线演示](#%E5%9C%A8%E7%BA%BF%E6%BC%94%E7%A4%BA)
- [常见问题](#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
- [贡献指南](#%E8%B4%A1%E7%8C%AE%E6%8C%87%E5%8D%97)
- [技术支持](#%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81)
- [开源协议](#%E5%BC%80%E6%BA%90%E5%8D%8F%E8%AE%AE)

---

🔧 系统要求
------

[](#-系统要求)

- **PHP** &gt;= 7.0
- **ext-curl** - HTTP请求支持
- **ext-json** - JSON数据处理
- **ext-openssl** - 加密和签名支持

---

🚀 快速开始
------

[](#-快速开始)

### 方式一：Composer安装（推荐）

[](#方式一composer安装推荐)

```
composer require openforall/wechat-sdk
```

### 方式二：手动下载

[](#方式二手动下载)

```
git clone https://github.com/openforall/wechat-sdk-php.git
cd wechat-sdk-php
```

### 基础使用

[](#基础使用)

```
