Download the PHP package pr2apisdk/sdk without Composer
On this page you can find all versions of the php package pr2apisdk/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download pr2apisdk/sdk
More information about pr2apisdk/sdk
Files in pr2apisdk/sdk
Download pr2apisdk/sdk
More information about pr2apisdk/sdk
Files in pr2apisdk/sdk
Please rate this library. Is it a good library?
Informations about the package sdk
API PHP SDK
说明
- 接口基地址,如: http://api.local.com/V4/ ,具体地址请咨询运营人员
- 接口遵循RESTful,默认请求体json,接口默认返回json
- app_id, app_secret 联系技术客服,先注册一个账号,用于申请绑定api身份
签名算法
- 每次请求都签名,保证传输过程数据不被篡改
- 客户端:sha256签名算法,将参数base64编码+app_secret用sha256签名,每次请求带上签名
- 服务端:拿到参数用相同的算法签名,对比签名是否正确
sdk 使用说明
- 环境:php >=5.5
- 支持get/post/patch/put/delete方法
- 参数说明
- app_id 分配的app_id
- app_secert 分配的app_secert, 用于签名数据
- api_pre api前缀
- timeout 请求超时时间,默认10秒,请合理设置
- 每次调用会返回三个参数:(原始字符串,解析后的json字典,错误字符串)
- 注意事项 针对所有请求,uri与get参数是分离的,如 https://api.local.com/V4/version?v=1, 调用时v=1参数,须通过query传递
安装
composer require pr2apisdk/sdk
使用
更新日志
- 2022.11.09
完成php版SDK开发
- 2022.11.28
修改默认的UserAgent SDK验证兼容json的UTF8编码格式
All versions of sdk with dependencies
PHP Build Version
Package Version
The package pr2apisdk/sdk contains the following files
Loading the files please wait ....