fastwhale/yii2-wechat

Fastwhale SCRM System Yii2 wechat SDKThis sdk must used in fastwhale scrm system

Installs: 43

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

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

This package is auto-updated.

Last update: 2024-10-30 02:16:25 UTC


README

Fastwhale SCRM System Yii2 wechat SDK This sdk must used in fastwhale scrm system.

Latest Stable Version Total Downloads License PHP Version Require

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist fastwhale/yii2-wechat "*"

or add

"fastwhale/yii2-wechat": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

/** @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,
]);