Download the PHP package luckyhjh/wechat-mini-program without Composer
On this page you can find all versions of the php package luckyhjh/wechat-mini-program. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package wechat-mini-program
微信小程序 SDK
用于 PHP 方便调用微信小程序的 服务端接口
接入要求
"php": ">=5.4"
接入方式
1、composer 安装
composer require luckyhjh/wechat-mini-program
2、新建文件
新建类继承 WechatMiniProgram,并实现相关接口,token 可保存在 redis 或 mysql 等。
例如 Laravel/Lumen,可新建文件 app/Libs/WechatMiniProgram.php:
例如 ThinkPHP,可新建文件 extend/WechatMiniProgram.php:
3、业务调用
业务里根据需要调用
支持接口
- AccessToken->getAccessToken():获取小程序全局唯一后台接口调用凭据
- Auth->code2session():用 code 获取 openid
- User->getPhoneNumber():获取手机号
- SubscribeMessage->send():发送订阅消息
- WxaCode->getUnlimited():生成小程序码,可接受页面参数较短,生成个数不受限
- WxaCode->get():生成小程序码,可接受 path 参数较长,生成个数受限
- SecCheck->messageIsRisky():文本是否为风险内容
- SecCheck->imageIsRisky():文本是否为风险内容
License
MIT
All versions of wechat-mini-program with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4
ext-curl Version *
ext-json Version *
ext-curl Version *
ext-json Version *
The package luckyhjh/wechat-mini-program contains the following files
Loading the files please wait ....