Download the PHP package lifetime/service without Composer
On this page you can find all versions of the php package lifetime/service. 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 service
service
本类库封装了一些常见的平台的部分接口
调用的逻辑为:平台::业务->功能->操作
比如:微信公众平台获取用户信息
目前包含的平台有:
- 支付宝和阿里云
- 微信
- 字节跳动
- 七牛云
配置
类库可以自动获取tp5.0、tp5.1、tp6.0和laravel的配置作为全局配置
比如 tp5.1,可以在config目录中添加一个 service.php
文件,加入如下配置
注意:默认获取配置的key为
service
如果想更换这个key为 my-service
,可以这样操作
如果类库无法获取到全局配置,可以初始化配置
注意:使用初始化方法之后,类库不会再从配置文件中获取配置;初始化必须在所有操作之前进行。
支持的平台和业务如下
平台 | 业务 | 功能 | 操作 |
WeChat - 微信 | official - 公众平台 | oauth - 网页授权 | getCode - 请求code(授权第一步) |
getUserAccessToken - 获取access_token | |||
refreshAccessToken - 刷新access_token | |||
getUserinfo - 获取用户个人信息 | |||
checkAccessToken - 校验授权凭证是否有效 | |||
getJsSdkSign - 获取JS-SDK使用权限 | |||
template - 模板消息 | setIndustry - 设置所属行业 | ||
getIndustry - 获取设置的行业信息 | |||
addTemplate - 添加模板 | |||
getAllPrivateTemplate - 获取模板列表 | |||
delPrivateTemplate - 删除模板 | |||
send - 发送模板消息 | |||
user - 用户管理 | createTag - 创建标签 | ||
getTag - 获取已经创建的用户标签 | |||
updateTag - 更新标签信息 | |||
delTag - 删除标签 | |||
getTagUser - 获取某个标签下的粉丝列表 | |||
batchBindTag - 批量为用户打标签 | |||
batchUnBindTag - 批量为用户取消标签 | |||
getUserTag - 获取用户身上的标签 | |||
updateRemark - 设置用户备注名 | |||
getUserinfo - 获取用户基本信息(UnionID机制) | |||
batchGetUserInfo - 批量获取用户基本信息 | |||
getUserList - 获取用户列表 | |||
getBlackList - 获取黑名单列表 | |||
bacthBlack - 批量拉黑用户 | |||
bacthUnBlack - 批量取消拉黑用户 | |||
pay - 支付v2 | app - app支付 | pay - 下单支付 | |
query - 查询订单 | |||
reverse - 撤销订单 | |||
refund - 申请退款 | |||
refundQuery - 退款查询 | |||
notify - 异步通知验签 | |||
jsapi - JSAPI支付 | pay - 下单支付 | ||
query - 查询订单 | |||
reverse - 撤销订单 | |||
refund - 申请退款 | |||
refundQuery - 退款查询 | |||
notify - 异步通知验签 | |||
native - Native支付 | pay - 下单支付 | ||
query - 查询订单 | |||
reverse - 撤销订单 | |||
refund - 申请退款 | |||
refundQuery - 退款查询 | |||
notify - 异步通知验签 | |||
h5 - H5支付 | pay - 下单支付 | ||
query - 查询订单 | |||
reverse - 撤销订单 | |||
refund - 申请退款 | |||
refundQuery - 退款查询 | |||
notify - 异步通知验签 | |||
miniApp - 小程序支付 | pay - 下单支付 | ||
query - 查询订单 | |||
reverse - 撤销订单 | |||
refund - 申请退款 | |||
refundQuery - 退款查询 | |||
notify - 异步通知验签 | |||
payV3 - 支付v3 | jsapi - JSAPI支付 | pay - 下单支付 | |
query - 查询订单 | |||
close - 关闭订单 | |||
notify - 异步通知验签 | |||
native - Native支付 | pay - 下单支付 | ||
query - 查询订单 | |||
close - 关闭订单 | |||
notify - 异步通知验签 | |||
app - app支付 | pay - 下单支付 | ||
query - 查询订单 | |||
close - 关闭订单 | |||
notify - 异步通知验签 | |||
h5 - H5支付 | pay - 下单支付 | ||
query - 查询订单 | |||
close - 关闭订单 | |||
notify - 异步通知验签 | |||
miniApp - 小程序支付 | pay - 下单支付 | ||
query - 查询订单 | |||
close - 关闭订单 | |||
notify - 异步通知验签 | |||
miniapp - 小程序 | login - 登录 | code2Session - 登录凭证校验 | |
userInfo - 用户信息 | check - |
||
decodeUserInfo - 用户信息解密 | |||
getPaidUnionId - 用户支付完成后,获取该用户的 UnionId | |||
Ali - 支付宝或者阿里云 | pay - 支付 | page - Web 页面支付 | |
wap - 手机网站支付 | |||
app - APP 支付 | |||
notify - 异步通知验签 | |||
query - 查询订单 | |||
refund - 申请退款 | |||
refundQuery - 退款查询 | |||
ByteDance - 字节跳动 | miniapp - 字节小程序 | code2Session - 获取 session_key 和 openId | |
checkUserInfo - 验证用户信息 | |||
getPayOrderInfo - 获取支付订单信息 | |||
createQRCode - 获取小程序或小游戏的二维码 |
All versions of service with dependencies
PHP Build Version
Package Version
The package lifetime/service contains the following files
Loading the files please wait ....