elilee / yii2-weixin
一个专注yii2de微信的sdk
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-httpclient: ^2.0
This package is not auto-updated.
Last update: 2024-05-17 08:07:44 UTC
README
写在前边, 该扩展根据北哥yii2-wx课程,边学边写的,但不保证和北哥代码完全一致,如果想要深入学习可以到北哥网站(https://nai8.me/)学习相关课程。
之所以建立这个扩展主要是为了自用方便。
一个yii2de微信的sdk (自用)
Installation
The preferred way to install this extension is through composer.
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
Setting
在 params 中增加如下内容
'wx'=>[
'app_id' => 'wxasdasf3slfmiem3mi2f',
'secret' => '***************************',
'token' => 'elilee',
'payment' => [
'mch_id' => '',//商户ID
'key' => '', //商户KEY
'notify_url' => '',//支付通知地址
'cert_path' => '',//证书
'key_path' => '',//证书
]
]
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
用户相关 支付相关 客服功能 红包相关