javareact / czb
车主邦PHP-SDK,Jiaolfei100 OpenApi SDK
1.0.6
2023-08-30 03:51 UTC
Requires
- php: >=7.1
- ext-bcmath: *
- ext-iconv: *
- ext-json: *
- ext-openssl: *
- guzzlehttp/guzzle: *
- psr/log: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- mockery/mockery: ^1.3
- monolog/monolog: *
- phpunit/phpunit: <9.0.0
README
车主邦-openapi
PHP-SDK
1. Require with Composer
composer require javareact/czb
2. Example
use GuzzleHttp\Client;
use JavaReact\CzbApi\Balance;
$goods = new Balance("apiKey", "secret", function() {
return new Client([
"base_uri" => \JavaReact\CzbApi\Client::DEFAULT_GATEWAY,//可省略
]);
});
$response = $balance->balanceGet("productid");
if($response->getStatusCode() == 200) {
$json = $response->json();
$result = $response->result();
}