Skip to content

h2akim/chip-php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP framework agnostic to work with CHIP API

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

About

PHP Agnostic to work with CHIP Asia API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages