composer require javareact/cq-api
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();
}