PHPackages                             tmzkj-yii2-shop/wechat - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tmzkj-yii2-shop/wechat

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tmzkj-yii2-shop/wechat
======================

PHP Wechat SDK

01PHP

Since Jan 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/haozhili520/wechat)[ Packagist](https://packagist.org/packages/tmzkj-yii2-shop/wechat)[ RSS](/packages/tmzkj-yii2-shop-wechat/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Wechat SDK
==============

[](#php-wechat-sdk)

Usage
-----

[](#usage)

### Install

[](#install)

```
composer require 'Tmzkj/wechat'
```

### Wechat

[](#wechat)

```
require __DIR__ . '/vendor/autoload.php';

$wechat = new \Tmzkj\Wechat\Wechat();
$accessToken = $wechat->getAccessToken;
```

### WechatPay

[](#wechatpay)

```
require __DIR__ . '/vendor/autoload.php';

$wechatPay = new \Tmzkj\Wechat\WechatPay();
$res = $wechatPay->unifiedOrder();
```

### WechatApi

[](#wechatapi)

`微信接口调用类`

### WechatSubscribe

[](#wechatsubscribe)

`订阅消息接口`

```
$wechat = new \Tmzkj\Wechat\Wechat();
$tid = 434;     // 模板标题 id，可通过接口获取，也可登录小程序后台查看获取
$kidList = [6, 5, 9, 1];      // 开发者自行组合好的模板关键词列表，可以通过 `getTemplateKeywords` 方法获取
$sceneDesc = '下单成功通知';    // 服务场景描述，非必填

$wechatSubscribe = new \Tmzkj\Wechat\WechatSubscribe($wechat);
$res = $wechatSubscribe->addTemplate($tid, $kidList, $sceneDesc);
```

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/62e400b0f84e8802f2a07938ccc654c2d28621073137501bac48ff0f877918f6?d=identicon)[haozhili520](/maintainers/haozhili520)

---

Top Contributors

[![haozhili520](https://avatars.githubusercontent.com/u/54346054?v=4)](https://github.com/haozhili520 "haozhili520 (1 commits)")

### Embed Badge

![Health badge](/badges/tmzkj-yii2-shop-wechat/health.svg)

```
[![Health](https://phpackages.com/badges/tmzkj-yii2-shop-wechat/health.svg)](https://phpackages.com/packages/tmzkj-yii2-shop-wechat)
```

PHPackages © 2026

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