PHPackages                             cjango/think-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. [API Development](/categories/api)
4. /
5. cjango/think-wechat

AbandonedArchivedThink-extend[API Development](/categories/api)

cjango/think-wechat
===================

cjango wechat sdk for thinkphp

v1.0.0(8y ago)025MITPHPPHP &gt;=7.0

Since Jan 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/cjango/think-wechat)[ Packagist](https://packagist.org/packages/cjango/think-wechat)[ Docs](https://github.com/cjango/think-wechat)[ RSS](/packages/cjango-think-wechat/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (2)Used By (0)

think-wechat
============

[](#think-wechat)

===============

[![Latest Stable Version](https://camo.githubusercontent.com/e0f6341e4d75969e4f50503d28a356bf6ed258295fe367e45c36f2d3c7960e49/68747470733a2f2f706f7365722e707567782e6f72672f636a616e676f2f7468696e6b2d7765636861742f76657273696f6e)](https://packagist.org/packages/cjango/think-wechat)[![Total Downloads](https://camo.githubusercontent.com/f7f090123f7d2b9c100f76b8167304d91bbfee6941b8e9760a49323b44ec5a8b/68747470733a2f2f706f7365722e707567782e6f72672f636a616e676f2f7468696e6b2d7765636861742f646f776e6c6f616473)](https://packagist.org/packages/cjango/think-wechat)[![Latest Unstable Version](https://camo.githubusercontent.com/97d70f75b3216de0667c0dd14f90b56e12aa43072ce049bf4db037b1aa90c8ab/68747470733a2f2f706f7365722e707567782e6f72672f636a616e676f2f7468696e6b2d7765636861742f762f756e737461626c65)](//packagist.org/packages/cjango/think-wechat)[![License](https://camo.githubusercontent.com/a79a806ecf6cdac7ce345c7ee5bfd7d40d016f0560993a62d19d5041fc56182f/68747470733a2f2f706f7365722e707567782e6f72672f636a616e676f2f7468696e6b2d7765636861742f6c6963656e7365)](https://packagist.org/packages/cjango/think-wechat)

#### 微信SDK For thinkphp5

[](#微信sdk-for-thinkphp5)

> 该项目属于于thinkphp5.0.\*扩展，省去了access\_token的获取与暂存，系统内部自动集成，需要什么功能直接调用即可，设计模式参考了thinkphp的容器模式，目前暂时只有部分基础功能，待完善。

安装
--

[](#安装)

> composer require cjango/think-wechat

配置
--

[](#配置)

> 配置文件位于 `application/extra/wechat.php`

```
return [
    'token'  => '',  // TOKEN
    'appid'  => '',  // APPID
    'secret' => '',  // 密钥
    'AESKey' => '',  // 数据传输加密密钥
    'mch_id' => '',  // 商户ID
    'paykey' => '',  // 支付密钥
    // PEM 文件路径
    'pem'    => [
        'cert' => '../certfiles/private_cert.pem',
        'key'  => '../certfiles/private_key.pem',
    ],
];

```

> 证书文件不要放在public目录下，以防被扫描下载，不使用微信红包和线上退款功能可以不用配置支付证书

使用方法
----

[](#使用方法)

```
// 引用命名空间
use cjango\wechat\Wechat;

// 获取全部关注用户
Wechat::get('user')->all();

// 网页用户直接跳转授权
Wechat::get('oauth')->url($callback);

// 回调页面中直接调用
Wechat::get('oauth')->token();

// 获取错误信息
Wechat::error()

```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3090d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b057654b5ef7e0c8fa3a6808cf812053ac9a7ce2bbd637c8f8889171db8572c1?d=identicon)[jasonencode](/maintainers/jasonencode)

---

Top Contributors

[![jasonencode](https://avatars.githubusercontent.com/u/2210843?v=4)](https://github.com/jasonencode "jasonencode (16 commits)")

---

Tags

sdkwechatcjango

### Embed Badge

![Health badge](/badges/cjango-think-wechat/health.svg)

```
[![Health](https://phpackages.com/badges/cjango-think-wechat/health.svg)](https://phpackages.com/packages/cjango-think-wechat)
```

###  Alternatives

[thenbsp/wechat

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

9408.2k](/packages/thenbsp-wechat)[itxiao6/wechat

MinKernel.Wechat

1062.8k](/packages/itxiao6-wechat)

PHPackages © 2026

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