PHPackages                             elilee/yii2-weixin - 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. elilee/yii2-weixin

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

elilee/yii2-weixin
==================

一个专注yii2de微信的sdk

v1.0.2(7y ago)181MITPHP

Since Aug 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/EliLee/yii2-weixin)[ Packagist](https://packagist.org/packages/elilee/yii2-weixin)[ RSS](/packages/elilee-yii2-weixin/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (4)Used By (0)

wx
==

[](#wx)

写在前边, 该扩展根据北哥yii2-wx课程,边学边写的，但不保证和北哥代码完全一致，如果想要深入学习可以到北哥网站（[https://nai8.me/）学习相关课程。](https://nai8.me/%EF%BC%89%E5%AD%A6%E4%B9%A0%E7%9B%B8%E5%85%B3%E8%AF%BE%E7%A8%8B%E3%80%82)

之所以建立这个扩展主要是为了自用方便。

一个yii2de微信的sdk (自用)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist elilee/yii2-wx "*"

```

or add

```
"elilee/yii2-wx": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Setting
-------

[](#setting)

在 params 中增加如下内容

```
'wx'=>[

        'app_id' => 'wxasdasf3slfmiem3mi2f',
        'secret' => '***************************',
        'token'  => 'elilee',

        'payment' => [
            'mch_id'        => '',//商户ID
            'key'           => '', //商户KEY
            'notify_url'    => '',//支付通知地址
            'cert_path'     => '',//证书
            'key_path'      => '',//证书
        ]
    ]

```

use
---

[](#use)

```
use elilee\wx\Application;

$config = Yii::$app->params['wx'];
$app = new Application(['conf'=>$config]);

$server=$app->driver('server');
$response = $server->server();

return $response;

```

function list
-------------

[](#function-list)

用户相关 支付相关 客服功能 红包相关

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Every ~1 days

Total

3

Last Release

2827d ago

### Community

Maintainers

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

---

Tags

yii2extensionweixin

### Embed Badge

![Health badge](/badges/elilee-yii2-weixin/health.svg)

```
[![Health](https://phpackages.com/badges/elilee-yii2-weixin/health.svg)](https://phpackages.com/packages/elilee-yii2-weixin)
```

###  Alternatives

[abei2017/yii2-wx

一个专注于yii2的微信sdk

1482.8k](/packages/abei2017-yii2-wx)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[imanilchaudhari/yii2-currency-converter

This extension will help to find out current currency conversion rate.

2011.6k](/packages/imanilchaudhari-yii2-currency-converter)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)[degordian/yii2-webhooks

Yii2 extension for webhooks

117.1k](/packages/degordian-yii2-webhooks)

PHPackages © 2026

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