fastwhale/yii2-wechat

Fastwhale SCRM系统Yii2微信SDK 此SDK必须在Fastwhale SCRM系统中使用

安装: 40

依赖: 0

建议: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:yii2-extension

v0.1.0 2023-09-01 03:00 UTC

This package is auto-updated.

Last update: 2024-09-30 01:57:36 UTC


README

Fastwhale SCRM系统Yii2微信SDK 此sdk必须在Fastwhale SCRM系统中使用。

Latest Stable Version Total Downloads License PHP Version Require

安装

安装此扩展的首选方式是通过 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,
]);