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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package service

service

本类库封装了一些常见的平台的部分接口
调用的逻辑为:平台::业务->功能->操作

比如:微信公众平台获取用户信息

目前包含的平台有:

  1. 支付宝和阿里云
  2. 微信
  3. 字节跳动
  4. 七牛云

配置

类库可以自动获取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
Requires php Version >=7.1
endroid/qr-code Version ^1.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lifetime/service contains the following files

Loading the files please wait ....