Skip to content

Latest commit

 

History

History

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Requirements

  • It is required PHP version >= 7.2
  • composer to install dependencies

Prerequisite

You will need to replace the value on file config.php with the configuration on your Developer section by logging-in to Merchant Portal with your account.

// config.php
<?php

return [
	'brand_id' => '<<BRAND_ID>>',
	'api_key' => '<<API_KEY>>',
	'endpoint' => 'https://gate.chip-in.asia/api/v1/',
  	'basedUrl' => '<<DOMAIN_URL>>',
  	'webhook_public_key' => "<<WEBHOOK_PUBLIC_KEY" // SHOULD BE WRAPPED IN DOUBLE QUOTES (")
];

BRAND_ID

Obtain your BRAND_ID from Developer section.


API_KEY

Obtain your API_KEY from Developer section.


WEBHOOK_PUBLIC_KEY

Obtain your WEBHOOK_PUBLIC_KEY from Developer section. You can register the URL from API or from Merchant Portal on Developer section.


DOMAIN_URL

It is your domain URL

Run Example

  1. Install dependencies:
composer install
  1. Run application locally:
php -S localhost:7001 

and visit localhost:7001 on your browser. To test /api/callback.php & /api/webhook.php to be called from our server, make sure it is connected to internet (exposed to outside).

We recommend to use ngrok if you want to run locally for debugging. Then You can replace DOMAIN_URL with generated URL by ngrok.

NB: Use it at your own risk. Make sure do not expose your critical port.