Download the PHP package xiaoye0402/slash-php-sdk without Composer
On this page you can find all versions of the php package xiaoye0402/slash-php-sdk. 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 slash-php-sdk
Slash PHP SDK
PHP SDK for Slash API - 用于接入 Slash API 的官方 PHP 客户端库。
安装
你可以使用 Composer 来安装此 SDK:
快速开始
配置选项
创建 SDK 实例时,可以传递以下配置项:
api_key: API 密钥,用于身份验证bearer_token: Bearer 令牌,用于身份验证username和password: 用户名和密码,用于基本身份验证base_url: API 基础 URL,默认为 https://api.joinslash.commax_retries: 请求失败时的最大重试次数,默认为 2timeout: 请求超时时间,默认为 30 秒default_headers: 要发送的默认请求头default_query: 要附加的默认查询参数
资源
SDK 提供了以下资源类:
$sdk->account()- 账户相关操作$sdk->transaction()- 交易相关操作$sdk->card()- 卡片相关操作
资源类都提供 list, retrieve, create 等方法。
异常处理
SDK 在遇到错误时会抛出相应的异常:
ApiConnectionException- 连接错误AuthenticationException- 身份验证失败NotFoundException- 资源未找到RateLimitException- 达到速率限制- 等等...
开发
如果你想要为 SDK 贡献代码:
- Fork 仓库
- 创建特性分支
- 提交你的修改
- 推送到分支
- 创建 Pull Request
运行测试
或者使用覆盖率:
许可证
本项目采用 MIT 许可证 - 请参阅 LICENSE 文件了解详情。
All versions of slash-php-sdk with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.4|^8.0
The package xiaoye0402/slash-php-sdk contains the following files
Loading the files please wait ...