Download the PHP package sureyee/laravel-rock-fintech without Composer
On this page you can find all versions of the php package sureyee/laravel-rock-fintech. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-rock-fintech
laravel钜石接口API
项目介绍
rock-fintech的laravel封装,加入事件,控制台等机制。dev-master为开发包,请谨慎使用
安装说明
-
安装接口包
composer require sureyee/laravel-rock-fentech
- 运行
php artisan vendor:publish
发布配置项文件
使用说明
所有的接口均使用API接口中的service
名称的小驼峰形式命名,可以通过Facade
门面直接调用。
-
调用接口:
-
非批次调用
-
批次调用
批次调用首先要创建一个
Transformer
类,实现TransformerInterface
接口。接口调用
-
添加
custom
参数Rock::createAccountP()->custom(['one' => 1])->send()
custom
方法接收一个string
或者array
用作自定义参数。数组会在放入Request
前转换为json
字符串.
-
-
处理异步回调
异步回调均通过事件解耦,可以在config文件中自定义回调触发事件,然后通过事件订阅者进行执行。
如果是推送到队列进行处理,抛出错误是没有办法被捕捉的。 并且会直接输出
success
-
系统维护
如果接口系统进入维护可以在
artisan
中执行命令来关闭接口的请求,该功能不会影响业务的回调操作。php artisan rock:down
命令会让系统进入维护状态,所有接口请求均会抛出SystemDownException
错误。捕捉错误后可以通过
Rock::getSystemMaintenanceTime()
方法获取系统维护的开始时间和结束时间。命令提供
start
参数指定系统维护开始时间,如:php artisan rock:down tomorrow
则明天开始进行维护命令提供
--h
选项指定系统维护时长,单位是小时,如:php artisan rock:down --h=2
现在开始进入维护,维护时间2小时,2小时后自动开启服务。php artisan rock:up
手动启动系统服务 -
事件
RockCallback
事件。RockCallback
事件用于处理接口的异步回调,如果没有在配置项中指定service
的回调事件,则默认触发该事件。RockBeforeRequest
事件,会在请求之前触发,通过$event->request
可以获得请求的Request
对象。RockAfterRequest
事件,会在同步回调完成之后触发,通过$event->request
可以获得Request
对象,$event->response
可以获得同步回调的Response
对象。 - future
- 账单数据自动读取
- request快速撤销
- request重发
- 自动对账
- 测试数据模拟回调
All versions of laravel-rock-fintech with dependencies
laravel/framework Version ^5.5|^5.6
sureyee/rock-fintech Version ^1.1
league/flysystem-sftp Version ^1.0