mtasuandi / tiket-php
Tiket.com PHP Wrapper
dev-master
2015-10-30 21:51 UTC
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: 4.4.1
This package is not auto-updated.
Last update: 2025-07-05 22:16:11 UTC
README
Tiket.com PHP Library
Tiket.com PHP Library http://docs.tiket.com/.
Quickstart
Register for an API key for production here and for development here.
Installation
composer require mtasuandi/tiket-php dev-master
Environment
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' ]
Usage Auth
<?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(); }
License
The MIT License (MIT).