xutl / yii2-wechat
The wechat extension for the Yii framework
Installs: 3 866
Dependents: 2
Suggesters: 0
Security: 0
Stars: 9
Watchers: 1
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- php: >=5.6.0
- xutl/yii2-authclient: ~1.0
- yiisoft/yii2-httpclient: ~2.0.0
Requires (Dev)
- phpunit/phpunit: ~6.0
README
这是一个适用于Yii2的微信SDK。
Feature
- 命名不那么乱七八糟;
- 隐藏开发者不需要关注的细节;
- 方法使用更优雅,不必再去研究那些奇怪的的方法名或者类名是做啥用的;
- 符合 PSR 标准,你可以各种方便的与你的框架集成;
- 高度抽象的消息类,免去各种拼json与xml的痛苦;
- 详细 Debug 日志,一切交互都一目了然;
Requirement
- PHP >= 5.6.0
- composer
- openssl 拓展
- fileinfo 拓展(素材管理模块需要用到)
Installation
composer require "xutl/yii2-wechat:~2.0" -vvv
Usage
基本使用(以服务端为例):
<?php 'components' => [ 'wechat' => [ 'class' => 'xutl\wechat\Wechat', 'appId' => 'wx23fc4372b2498821', 'appSecret' => '5a4014e73817483362d54f77f8bdb6b9', 'components' => [ 'oauth' => [ 'useOpenId' => false ], 'openOAuth' => [ 'useOpenId' => false ] ], ], ]
Documentation
- 微信公众平台文档: https://mp.weixin.qq.com/wiki
Thanks to
License
MIT