hakimrazalan/chip-php-sdk
最新稳定版本:1.3
Composer 安装命令:
composer require hakimrazalan/chip-php-sdk
包简介
PHP framework agnostic to work with CHIP Asia API
README 文档
README
Installation
Composer
To install through composer by using the following command:
composer require php-http/guzzle7-adapter hakimrazalan/chip-php-sdk
HTTP Adapter
Refer PHP-HTTP Clients & Adapters for other supported clients and adapters.
Get Started
Creating client
To create CHIP client, you need to know which service you want to use - Collect / Send. Use the following codes:
use Chip\Client;
// To use Collect
$collect = Client::makeCollect("myApiKey");
// To use Send
$send = Client::makeSend("myApiKey", "secretKey");
You can also use a config object to make the client easier to extend:
use Chip\Client;
use Chip\Config;
$collect = Client::makeCollect(
Config::collect("myApiKey")->withVersion("v1")
);
$send = Client::makeSend(
Config::send("myApiKey", "secretKey")
->withSandbox(true)
);
Alternatively, you could configure Http\Client\Common\HttpMethodsClient manually
use Chip\Client;
// To use Collect
$http = Laravie\Codex\Discovery::client();
$collect = Client::makeCollect("myApiKey", $http);
// To use Send
$send = Client::makeSend("myApiKey", "secretKey", $http);
Use Sandbox
Sandbox options is only supported for Send API. To use sandbox environment:
$send->useSandbox();
Usages
For Collect → Here
For Send → Here
统计信息
- 总下载量: 175
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-06