All Projects → abei2017 → Yii2 Wx

abei2017 / Yii2 Wx

这可能是yii2中最好用的微信SDK🔥🔥🔥

Projects that are alternatives of or similar to Yii2 Wx

Rageframe2
一个基于Yii2高级框架的快速开发应用引擎
Stars: ✭ 1,553 (+949.32%)
Mutual labels:  wechat-pay, yii2, wechat
Gochat
🔥 微信 Go SDK 🚀🚀🚀
Stars: ✭ 141 (-4.73%)
Mutual labels:  wechat-sdk, wechat-pay, wechat
Abp.wechat
Abp 微信 SDK 模块,包含对微信小程序、公众号、企业微信、开放平台、第三方平台等相关接口封装。
Stars: ✭ 168 (+13.51%)
Mutual labels:  wechat-sdk, wechat-pay, wechat
Wechat Php Sdk
PHP微信SDK(微信平台 + 微信支付)
Stars: ✭ 637 (+330.41%)
Mutual labels:  wechat-sdk, wechat-pay, wechat
Yii2 Migrik
Yii2 Gii-tools for create migration files
Stars: ✭ 99 (-33.11%)
Mutual labels:  yii2, yii2-extension
Yii2 Gallery Manager
Stars: ✭ 90 (-39.19%)
Mutual labels:  yii2, yii2-extension
Easyopenwechat
微信公众号第三方平台SDK
Stars: ✭ 105 (-29.05%)
Mutual labels:  wechat-sdk, wechat
Csv Grid
Yii2 extension for CSV export
Stars: ✭ 83 (-43.92%)
Mutual labels:  yii2, yii2-extension
Ar Position
ActiveRecord behavior, which provides ability for custom records order setup
Stars: ✭ 107 (-27.7%)
Mutual labels:  yii2, yii2-extension
Yii2 Phone Input
Yii2 International telephone numbers
Stars: ✭ 114 (-22.97%)
Mutual labels:  yii2, yii2-extension
Yii2fullcalendar
JQuery Fullcalendar Yii2 Extension
Stars: ✭ 120 (-18.92%)
Mutual labels:  yii2, yii2-extension
Yii2 Aws S3
An Amazon S3 component for Yii2
Stars: ✭ 86 (-41.89%)
Mutual labels:  yii2, yii2-extension
Wechat
API, command and message handling for WeChat in Rails
Stars: ✭ 1,251 (+745.27%)
Mutual labels:  wechat-sdk, wechat
Admin
Admin pack (actions, widgets, etc) for Yii2
Stars: ✭ 100 (-32.43%)
Mutual labels:  yii2, yii2-extension
Ar Linkmany
ActiveRecord behavior for saving many-to-many relations
Stars: ✭ 83 (-43.92%)
Mutual labels:  yii2, yii2-extension
Yii2 Cart
Yii2 shopping cart
Stars: ✭ 118 (-20.27%)
Mutual labels:  yii2, yii2-extension
Yii2 Rbac
RBAC Manager for Yii 2
Stars: ✭ 128 (-13.51%)
Mutual labels:  yii2, yii2-extension
Oss.clients.sns
社交网站sdk(标准库),微信公众号(订阅号,服务号,小程序)接口sdk-包含消息回复(明文和安全模式),Oauth2.0授权等
Stars: ✭ 136 (-8.11%)
Mutual labels:  wechat-sdk, wechat
Cordova Plugin Wechat
A cordova plugin, a JS version of Wechat SDK
Stars: ✭ 1,198 (+709.46%)
Mutual labels:  wechat-sdk, wechat
Yii2 Schemadump
Generate the schema from an existing database.
Stars: ✭ 78 (-47.3%)
Mutual labels:  yii2, yii2-extension

yii2-wx Logo

一款服务于yii2的微信SDK(公众号、小程序、开放平台和企业微信)


文档

业务的实现方案以及生态

系统需求(Requirement)

  • PHP >= 5.4
  • Composer
  • openssl
  • fileinfo

安装(Installation)

$ composer require "abei2017/yii2-wx" -vvv

配置(set)

配置参数建议存放到yii2的配置文件中,例如基础版yii2可以如下配置

return [
    'wx'=>[
        //  公众号信息
        'mp'=>[
            //  账号基本信息
            'app_id'  => '', // 公众号的appid
            'secret'  => '', // 公众号的秘钥
            'token'   => '', // 接口的token
            'encodingAESKey'=>'',
            'safeMode'=>0,

            //  微信支付
            'payment'=>[
                'mch_id'        =>  '',// 商户ID
                'key'           =>  '',// 商户KEY
                'notify_url'    =>  '',// 支付通知地址
                'cert_path'     => '',// 证书
                'key_path'      => '',// 证书
            ],

            // web授权
            'oauth' => [
                'scopes'   => 'snsapi_userinfo',// 授权范围
                'callback' => '',// 授权回调
            ],
        ],

        //  小程序配置
        'mini'=>[
            //  基本配置
            'app_id'  => '', 
            'secret'  => '',
            'token' => '',
            'safeMode'=>0,
            'encodingAESKey'=>'',
            //  微信支付
            'payment' => [
                'mch_id'        => '',
                'key'           => '',
            ],
        ]
    ]
];

对于配置,请不要修改数据的key值。

使用(use)

yii2-wx采用单一接口驱动功能的思路,比如下面的代码将生成一个微信带参数的二维码。

use abei2017\wx\Application;

//  方法一
$qrcode = (new Application())->driver('mp.qrcode');

//  方法二
$conf = Yii::$app->params['wechat'];// 自定义配置数组key(最后一层数组key不可以更改)
$app = new Application(['conf'=>$conf]);

$qrcode = $app->driver('mp.qrcode');
$data = $qrcode->intTemp(3600,9527);// 生成一个数字类临时二维码,有效期为3600秒

功能实现

微信公众号

  • [x] 获取接口调用凭证
  • [x] 获取微信服务器IP地址
  • [x] 验证消息真实性
  • [x] 服务器接收实现
  • [x] 客户端响应相关接口
  • [x] 带参数的二维码
  • [x] 用户管理
  • [x] 素材管理
  • [x] 菜单管理
  • [x] 消息模板发送
  • [x] web授权机制
  • [x] JSSDK
  • [x] 微信支付(扫码支付/公众号浏览器支付)
  • [x] 企业付款到零钱包
  • [x] 现金红包

微信小程序

  • [x] 获取接口调用凭证
  • [x] 小程序码
  • [x] 小程序的微信支付
  • [x] 小程序模板
  • [x] 小程序客服消息
  • [x] 内容安全

开源协议(License)

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].