hakimrazalan/chip-php-sdk

PHP Agnostic to work with CHIP Asia API

1.0 2025-04-05 07:49 UTC

This package is auto-updated.

Last update: 2025-04-07 01:11:17 UTC


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
$collect = Client::makeSend("myApiKey", "secretKey");

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