Download the PHP package olaf/clock without Composer

On this page you can find all versions of the php package olaf/clock. 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 clock

1.参与活动流程图

2.包安装

2.1 项目composer更新

2.1.1 execute composer

2.2 Provider配置文件

    2.2.1 Open your config/app.php and add the following to the providers array:

2.1.2 Run the command below to publish the package config file config/clock.php

2.3 Clock配置更新

2.3.1 检测项目Migrate状态

2.3.2 若未初始话,需要先初始化Migrate服务,否则,跳过该步骤

2.3.3 再次检测Migrate状态

2.3.4 生成Clock的数据库迁移信息

该命令执行后,生成 <timestamp>_clock_setup_tables.php 文件 2.3.5 数据库迁移

2.3.6 日志文件配置 config/logging.php中在 channels 数组中添加如下内容

3.接口服务

3.1 获取参与打卡首页信息

请求参数:

字段 字段名称 类型 备注
uid 平台用户ID int
extra 额外参数 array
extra.mobile 用户的手机号 string
extra.nickname 用户的昵称 string
extra.openId 用户在渠道的ID string

响应参数模版:

字段 字段名称 类型 备注
status 业务状态码 int 0:表示业务失败,1:表示成功
message 业务响应内容 string
data 业务数据块 array

响应参数:

字段 字段名称 类型 备注
status 业务状态码 int 0:表示业务失败,1:表示成功
message 业务响应内容 string
data 业务数据块 array
data.summary 数据概览 array
data.summary.is_remind 打卡提醒 boolean 0:表示关闭,1:表示开启
data.summary.clock_status 参与状态 int 0:未参加, 1:已参加, 2:已打卡
data.summary.user_num 参与人数 int
data.summary.clock_user_num 打卡成功人数 int
data.summary.clock_money 奖池奖金 int 按天参与报名的总金额
data.summary.clock_time 打卡倒计时 int 距离05:00的倒计时时间戳
data.summary.red_time 开奖倒计时 int 距离08:05的倒计时时间戳
data.summary.zero_time 零点开关 int
data.summary.is_start 活动是否开启 boolean
data.summary.is_alert 是否需要弹窗 boolean
data.summary.yest_money 昨日奖金池 int

3.2 参与打卡活动支付

活动支付的流程为clock服务提供生成订单号,订单号及相关的业务参数初始化后,在向渠道发起支付请求 请求地址:

请求参数:

字段 字段名称 类型 备注
uid 平台用户ID int
extra 额外参数 array
extra.mobile 用户的手机号 string
extra.nickname 用户的昵称 string
extra.openId 用户在渠道的ID string

响应参数:

字段 字段名称 类型 备注
status 业务状态码 int 0:表示业务失败,1:表示成功
message 业务响应内容 string
data 业务数据块 array
data.order_id 订单ID int
data.order_no 外部订单号 string

3.3 异步回调通知

接受渠道的回调通知,按业务需求处理打卡订单逻辑及用户参与信息 请求地址:

请求参数:

字段 字段名称 类型 备注
order_no 外部订单号 string
extra 额外回调信息 array
extra.amount 回调通知订单金额 int
extra.buyerId 用户在渠道的ID信息 string
extra.notify_time 回调通知时间 string
extra.content 回调的内容块 string
extra.nickname 用户的昵称信息 string
extra.mobile 用户的手机信息 string
extra.transactionId 渠道订单号信息 string

响应参数:

字段 字段名称 类型 备注
status 业务状态码 int 0:表示业务失败,1:表示成功
message 业务响应内容 string
data 业务数据块 array

3.4 检测用户的打卡状态

该接口服务用于用户在打卡前的检测,防止已打卡的用户再次发起打卡操作; 请求地址:

请求参数:

字段 字段名称 类型 备注
uid 平台用户ID int

响应参数:

字段 字段名称 类型 备注
status 业务状态码 int 0:表示业务失败,1:表示成功
message 业务响应内容 string
data 业务数据块 array
data.is_check_in 是否已打卡 boolean 1:表示已打卡;0:表示未打卡

3.5 用户参与打卡

请求地址:

请求参数:

字段 字段名称 类型 备注
uid 平台用户ID int

响应参数:

字段 字段名称 类型 备注
status 业务状态码 int 0:表示业务失败,1:表示成功
message 业务响应内容 string
data 业务数据块 array
data.money 参与活动报名日的总奖金池 int

3.6 系统定时任务红包瓜分

打卡活动在早上8点结束,系统开始定时任务,将总奖池的红包进行拆分业务,红包总额 = 参与活动报名的总奖金池 - 已成功打卡的总额;在把瓜分的红包放入缓存中; 请求地址:

3.7 用户领取红包

定时任务将参与活动未打卡的金额转为奖金,瓜分到每个用户奖金,用户获得的金额为参与打卡费用+红包; 请求地址:

请求参数:

字段 字段名称 类型 备注
uid 平台用户ID int

响应参数:

字段 字段名称 类型 备注
status 业务状态码 int 0:表示业务失败,1:表示成功
message 业务响应内容 string
data 业务数据块 array
data.assign 分配的红包信息 array
data.assign.money 分配的红包金额 int

4.系统定时任务

4.1 瓜分红包定时任务

每天早上8:05分执行,用于将未打卡的参与用户的活动金额瓜分;


All versions of clock with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
ext-json Version *
illuminate/support Version ~5.0
illuminate/console Version ~5.0
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 olaf/clock contains the following files

Loading the files please wait ....