lucups / easywechat
微信SDK
6.15.0
2024-01-26 06:35 UTC
Requires
- php: >=8.0.2
- ext-curl: *
- ext-fileinfo: *
- ext-libxml: *
- ext-openssl: *
- ext-simplexml: *
- ext-sodium: *
- nyholm/psr7: ^1.5
- nyholm/psr7-server: ^1.0
- overtrue/socialite: ^3.5.4|^4.0.1
- psr/http-client: ^1.0
- psr/simple-cache: ^1.0|^2.0|^3.0
- symfony/cache: ^5.4|^6.0|^7.0
- symfony/http-client: ^5.4|^6.0|^7.0
- symfony/http-foundation: ^5.4|^6.0|^7.0
- symfony/mime: ^5.4|^6.0|^7.0
- symfony/polyfill-php81: ^1.25
- symfony/psr-http-message-bridge: ^2.1.2|^6.4.0
- thenorthmemory/xml: ^1.0
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.8
- jetbrains/phpstorm-attributes: ^1.0
- laravel/pint: ^1.2
- mikey179/vfsstream: ^1.6
- mockery/mockery: ^1.4.4
- phpstan/phpstan: ^1.0
- phpunit/phpunit: ^9.5
- symfony/var-dumper: ^5.2
README
环境需求
- PHP >= 8.0.2
- Composer >= 2.0
安装
composer require lucups/easywechat:6.15.0
使用示例
基本使用(以公众号服务端为例):
<?php use EasyWeChat\OfficialAccount\Application; $config = [ 'app_id' => 'wx3cf0f39249eb0exxx', 'secret' => 'f1c242f4f28f735d4687abb469072xxx', 'aes_key' => 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFG', 'token' => 'easywechat', ]; $app = new Application($config); $app->getServer()->with(fn() => "您好!EasyWeChat!"); $response = $server->serve();
文档和链接
License
MIT