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

2.0.0.11 2018-06-29 10:24 UTC

This package is auto-updated.

Last update: 2024-04-11 01:26:32 UTC


README

这是一个适用于Yii2的微信SDK。

Build Status

Feature

  • 命名不那么乱七八糟;
  • 隐藏开发者不需要关注的细节;
  • 方法使用更优雅,不必再去研究那些奇怪的的方法名或者类名是做啥用的;
  • 符合 PSR 标准,你可以各种方便的与你的框架集成;
  • 高度抽象的消息类,免去各种拼json与xml的痛苦;
  • 详细 Debug 日志,一切交互都一目了然;

Requirement

  1. PHP >= 5.6.0
  2. composer
  3. openssl 拓展
  4. 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

Thanks to

License

MIT