2017 © Pedro Peláez
 

library wechat

微信SDK

image

barretzhi/wechat

微信SDK

  • Monday, November 6, 2017
  • by barretzhi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1778 Forks
  • 0 Open issues
  • 61 Versions
  • 7 % Grown

The README.md

<, (*1)

p align="center"> EasyWeChat , (*2)

📦 It is probably the best SDK in the world for developing Wechat App., (*3)

Build Status Latest Stable Version Latest Unstable Version Build Status Scrutinizer Code Quality Code Coverage Total Downloads License , (*4)

, (*5)

Special thanks to the generous sponsorship by:



, (*6)

, (*7)

关注我的公众号我们一起聊聊代码怎么样?, (*8)

Feature

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

Requirement

  1. PHP >= 7.0
  2. composer
  3. openssl 拓展
  4. fileinfo 拓展(素材管理模块需要用到)

SDK 对所使用的框架并无特别要求, (*9)

Installation

注意!当前分支这 4.0 分支, 4.0 还没有发布,意味着你无法通过下面的命令来安装。如果你想尝鲜 4.0 可以将 4.0 换成 dev-master 安装。, (*10)

composer require "overtrue/wechat:~4.0" -vvv

Usage

基本使用(以服务端为例):, (*11)

<?php

use EasyWeChat\Factory;

$options = [
    'app_id'    => 'wx3cf0f39249eb0exxx',
    'secret'    => 'f1c242f4f28f735d4687abb469072xxx',
    'token'     => 'easywechat',
    'log' => [
        'level' => 'debug',
        'file'  => '/tmp/easywechat.log',
    ],
    // ...
];

$app = Factory::officialAccount($options);

$server = $app->server;
$user = $app->user;

$server->push(function($message) use ($user) {
    $fromUser = $user->get($message['FromUserName']);

    return "{$fromUser->nickname} 您好!欢迎关注 overtrue!";
});

$server->serve()->send();

更多请参考 https://easywechat.com/。, (*12)

Documentation

  • Homepage: https://easywechat.com
  • Forum: https://easywechat.com/discussions
  • 微信公众平台文档: https://mp.weixin.qq.com/wiki
  • WeChat Official Documentation: http://admin.wechat.com/wiki

强烈建议看懂微信文档后再来使用本 SDK。, (*13)

Integration

Laravel 5 拓展包: overtrue/laravel-wechat, (*14)

Contribution

Contribution Guide, (*15)

License

MIT, (*16)

The Versions

06/11 2017
03/11 2017

dev-cleanup-payment

dev-cleanup-payment

微信SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

02/11 2017

dev-unified-get-stream

dev-unified-get-stream

微信SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

23/09 2017
12/09 2017
31/08 2017
20/08 2017

4.0.0-alpha.2

4.0.0.0-alpha2

微信SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

08/03 2017

2.1.x-dev

2.1.9999999.9999999-dev

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-openssl *

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

05/09 2016

2.1.39

2.1.39.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-openssl *

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

05/09 2016

2.1.41

2.1.41.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-openssl *

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

16/07 2016

2.1.38

2.1.38.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-mcrypt *

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

19/02 2016

3.0.1

3.0.1.0

微信SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

17/02 2016

3.0

3.0.0.0

微信SDK

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar overtrue

sdk weixin wechat weixin-sdk

18/08 2015

2.0.x-dev

2.0.9999999.9999999-dev

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-mcrypt *

 

by Avatar overtrue

sdk weixin wechat weixin-sdk

18/08 2015

2.1.0

2.1.0.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-mcrypt *

 

by Avatar overtrue

sdk weixin wechat weixin-sdk

11/08 2015

2.0.35

2.0.35.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-mcrypt *

 

by Avatar overtrue

sdk weixin wechat weixin-sdk

08/05 2015

2.0.1

2.0.1.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-mcrypt *

 

by Avatar overtrue

sdk weixin wechat weixin-sdk

07/05 2015

2.0.0

2.0.0.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3
  • ext-mcrypt *

 

by Avatar overtrue

sdk weixin wechat weixin-sdk

19/03 2015

1.0.1

1.0.1.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by Avatar overtrue

sdk weixin wechat weixin-sdk

13/03 2015

1.0

1.0.0.0

微信SDK

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by Avatar overtrue

sdk weixin wechat weixin-sdk