Skip to content

mtasuandi/tiket-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

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).

Releases

No releases published

Packages

No packages published

Languages