javareact / cq-api
橙券PHP-SDK,ChengQuan OpenApi SDK
2.0.1
2020-10-13 11:15 UTC
Requires
- php: >=7.1
- ext-bcmath: *
- ext-json: *
- ext-openssl: *
- guzzlehttp/guzzle: *
- psr/log: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.3
- monolog/monolog: ^1.25.1
- phpunit/phpunit: <9.0.0
This package is auto-updated.
Last update: 2025-01-13 21:25:58 UTC
README
ChengQuan-openapi
PHP-SDK
1. Require with Composer
composer require javareact/cq-api
2. Example
use GuzzleHttp\Client;
use JavaReact\CQApi\CQBalance;
$goods = new CQBalance("appKey", "secret", function() {
return new Client([
"base_uri" => \JavaReact\CQApi\Client::DEFAULT_GATEWAY,//可省略
]);
});
$response = $balance->balanceGet("productid");
if($response->getStatusCode() == 200) {
$json = $response->json();
$result = $response->result();
}