ifornew / wechat
微信SDK
2.1.1
2022-12-19 09:51 UTC
Requires
- php: >=7.4
- ext-fileinfo: *
- ext-libxml: *
- ext-openssl: *
- ext-simplexml: *
- easywechat-composer/easywechat-composer: ^1.1
- guzzlehttp/guzzle: ^6.2 || ^7.0
- ifornew/socialite: ^3.2 || ^4.0
- monolog/monolog: ^1.22 || ^2.0
- pimple/pimple: ^3.0
- psr/simple-cache: ^1.0||^2.0||^3.0
- symfony/cache: ^3.3 || ^4.3 || ^5.0 || ^6.0
- symfony/event-dispatcher: ^4.3 || ^5.0 || ^6.0
- symfony/http-foundation: ^2.7 || ^3.0 || ^4.0 || ^5.0 || ^6.0
- symfony/psr-http-message-bridge: ^0.3 || ^1.0 || ^2.0
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.7
- dms/phpunit-arraysubset-asserts: ^0.2.0
- friendsofphp/php-cs-fixer: ^3.5.0
- mikey179/vfsstream: ^1.6
- mockery/mockery: ^1.2.3
- phpstan/phpstan: ^0.12.0
- phpunit/phpunit: ^9.3
This package is not auto-updated.
Last update: 2025-03-25 18:06:42 UTC
README
📦 一个 PHP 微信开发 SDK,翻译至:w7corp/easywechat:^6.7,并支持 PHP 7.x
环境需求
- PHP >= 7.4
- Composer >= 2.0
安装
composer require ifornew/wechat
使用示例
基本使用(以公众号服务端为例):
<?php
use Ifornew\WeChat\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();
文档和链接
:heart: 支持我
如果你喜欢我的项目并想支持它,点击这里 :heart:
由 JetBrains 赞助
非常感谢 Jetbrains 为我提供的 IDE 开源许可,让我完成此项目和其他开源项目上的开发工作。
License
MIT