PHPackages                             lv\_fan2008/wx\_component - 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. lv\_fan2008/wx\_component

ActiveLibrary

lv\_fan2008/wx\_component
=========================

weixin open platform third sdk.

v2.0.2(9y ago)4716214MITPHPPHP &gt;=5.6.0

Since Apr 28Pushed 9y ago2 watchersCompare

[ Source](https://github.com/lvfan2008/wx_component)[ Packagist](https://packagist.org/packages/lv_fan2008/wx_component)[ RSS](/packages/lv-fan2008-wx-component/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (2)Used By (0)

微信开放平台 公众号第三平台类库
----------------

[](#微信开放平台-公众号第三平台类库)

wx\_component 2.0 微信公众号第三平台类库，PHP版本。

wx\_component 2.0 是根据[微信官方开放平台](https://open.weixin.qq.com/)提供的文档开发的PHP类库， 第三方平台使用此类库，可以在部署代码和代公众号实现业务时，更加容易、方便上手。 wx\_component 2.0 增加了代公众号实现对微信支付的支持

下载
--

[](#下载)

你可以 clone 这个仓库，自行下载使用。

实现功能
----

[](#实现功能)

1. 实现公众号授权和绑定
2. 代公众号实现业务
3. 代公众号使用JS SDK
4. 第三方平台事件通知处理
5. 实现公众号全网发布接入检测的自动化测试代码
6. 代公众号实现对微信支付的支持，包含：
    - 微信被扫支付
    - 微信扫码支付
    - 微信JSAPI支付
    - 微信地址本
    - 微信订单查询
    - 微信订单退款
    - 微信订单退款查询
    - 微信对账单下载
7. 增加微信开放平台网站应用微信扫码登录支持
8. 增加微信开放平台官方JS SDK DEMO的整体实现
9. 增加对composer的支持

简单使用说明
------

[](#简单使用说明)

1. 假设配置网站根目录为/data/wx\_component/
2. 网站目录结构为/data/wx\_component/example/和/data/wx\_component/src/
3. 假设网站域名为www.xxx.com
4. 配置公众号第三方平台参数
    - 授权事件接收URL：[http://www.xxx.com/example/component\_event.php](http://www.xxx.com/example/component_event.php)
    - 公众号消息与事件接收URL:
    - 根据需要配置其他参数
5. 把配置的第三方平台参数配置/example/config.php
6. 配置完成后，等待component\_verify\_ticket消息（10分钟1次）到来后，进行全网发布接入检测。
7. 如果不成功，检查以下几项
    - 检查/example/目录是否可写
    - 检查/example/cache/目录的日志文件，查看原因
    - 检查apache rewrite模块是否开启，是否支持.htaccess
8. 发布成功后，用浏览器打开example的php样例，检测授权、js\_sdk功能。

Composer安装说明
------------

[](#composer安装说明)

1. composer require lv\_fan2008/wx\_component
2. composer中文文档参考

我的测试环境
------

[](#我的测试环境)

1. 使用的是阿里云主机
2. 操作系统为Debian 8.0 64Bits
3. Apache/2.4.10 (Debian) PHP 5.6.27
4. php扩展模块有curl openssl

建议和疑问
-----

[](#建议和疑问)

如果你有好的建议或者疑问，欢迎给我提issue或pull request，或者发邮件到[lv\_fan2008@sina.com](mailto:lv_fan2008@sina.com) 。 也可以加入到QQ群519270384进行讨论。

LICENSE
-------

[](#license)

[MIT](https://opensource.org/licenses/MIT)，尽情享受开源代码。

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a20b1619567439d05454592b0f9e5bcc4526fb76cdc0ca2968ba4a87d8e1df71?d=identicon)[lv\_fan2008](/maintainers/lv_fan2008)

---

Top Contributors

[![lvfan2008](https://avatars.githubusercontent.com/u/23689929?v=4)](https://github.com/lvfan2008 "lvfan2008 (44 commits)")[![jiaochangyun](https://avatars.githubusercontent.com/u/1383683?v=4)](https://github.com/jiaochangyun "jiaochangyun (1 commits)")

---

Tags

phpwechatwechat-open-sdkwx-componentweixinwx\_componentwechat-open-sdk

### Embed Badge

![Health badge](/badges/lv-fan2008-wx-component/health.svg)

```
[![Health](https://phpackages.com/badges/lv-fan2008-wx-component/health.svg)](https://phpackages.com/packages/lv-fan2008-wx-component)
```

###  Alternatives

[w7corp/easywechat

微信SDK

10.4k761.6k60](/packages/w7corp-easywechat)[overtrue/laravel-wechat

微信 SDK for Laravel

3.0k1.8M53](/packages/overtrue-laravel-wechat)[hanson/vbot

高度自定义的微信机器人，能够实现群控制，自动回复，消息转发，防撤回，留言统计等功能

4.4k14.4k12](/packages/hanson-vbot)[thenbsp/wechat

微信公众平台第三方 SDK 开发包，优雅、健壮，可扩展，遵循 PSR 开发规范。

9408.2k](/packages/thenbsp-wechat)[naixiaoxin/think-wechat

EasyWechat For Thnkphp5.1+

27316.1k1](/packages/naixiaoxin-think-wechat)[gaoming13/wechat-php-sdk

微信公众平台php版开发包

3311.7k](/packages/gaoming13-wechat-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
