changecoins/http-client
最新稳定版本:1.0.9
Composer 安装命令:
composer require changecoins/http-client
包简介
Changecoins' PHP SDK for merchant REST API
README 文档
README
Client usage
To initialize http-client you should provide your secretKey and publicKey.
If you do not have them, you can connect with us tech@changecoins.io.
To initialize http-client you should provide your secretKey and publicKey.
<?php declare(strict_types=1); namespace App; use ChangeCoins\ClientFacade; use ChangeCoins\Factory\RequestConfig; ... $clientFacade = new ClientFacade(new RequestConfig('secretKey', 'publicKey')); $client = $clientFacade->createClient();
Request examples
<?php ... $balanceDto = new BalanceDto(); $balanceDto->setNonce(time()); $result = $client->getBalance($balanceDto)->toArray();
All request examples you can find here.
Validation errors
Please, note, that current API doesn't correspond to all existing RESTFull API requirements. The responses are unusual (not HTTP status codes) when an error occurs as a result of validation. Response HTTP status code will be 200 and the response body:
{
"err_code": 102,
"err_description": "error description"
}
If the server will return a validation error, the client will throw ResponseValidationException.
This type of exception extends \RuntimeException class
You can find out how does our API works here.
统计信息
- 总下载量: 17.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2021-07-22