fastwhale / yii2-wechat
Fastwhale SCRM系统Yii2微信SDK 此SDK必须在Fastwhale SCRM系统中使用
v0.1.0
2023-09-01 03:00 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-30 01:57:36 UTC
README
Fastwhale SCRM系统Yii2微信SDK 此sdk必须在Fastwhale SCRM系统中使用。
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一:
php composer.phar require --prefer-dist fastwhale/yii2-wechat "*"
或者将以下内容添加到你的composer.json
文件的require部分:
"fastwhale/yii2-wechat": "*"
to the require section of your composer.json file.
用法
扩展安装后,只需在你的代码中使用它即可
/** @var Wechat $wechat */ $wechat = \Yii::createObject([ 'class' => Wechat::className(), 'appId' => $appid, 'appSecret' => $appSecret, 'token' => $token, ]); /** @var Wechat $wechat */ $wechat = \Yii::createObject([ 'class' => Wechat::className(), 'appId' => $appid, 'appSecret' => $appSecret, 'token' => $token, 'componentAppId' => $componentAppId, ]); /** @var Wechat $wechat */ $wechat = \Yii::createObject([ 'class' => Wechat::className(), 'appId' => $appid, 'appSecret' => $appSecret, 'token' => $token, 'componentAppId' => $componentAppId, '_componentAccessToken' => $componentAccessToken, ]);