Tiket.com PHP Library http://docs.tiket.com/.
Register for an API key for production here and for development here.
composer require mtasuandi/tiket-php dev-master
By default, the API will point to sandbox url. If you want to change to production, change Util/config.php.
From:
'settings' => [
'version' => '1.0',
/**
* Determine application environment
* Development: api-sandbox
* Production: api
*/
'api' => 'api-sandbox'
]
To:
'settings' => [
'version' => '1.0',
/**
* Determine application environment
* Development: api-sandbox
* Production: api
*/
'api' => 'api'
]
<?php
require_once __DIR__ . '/../vendor/autoload.php';
use Mtasuandi\Tiket\Auth\TiketAuth;
use Mtasuandi\Tiket\Exceptions\AuthException;
$auth = new TiketAuth( 'API_KEY' );
try {
$access_token = $auth->getToken();
echo '<pre>'; print_r( $access_token ); echo '</pre>';
} catch (AuthException $e) {
echo $e->getMessage();
}
The MIT License (MIT).