coas/tcu

There is no license information available for the latest version (dev-master) of this package.

Package for easing tcu integration with your admission system

dev-master 2019-07-03 08:39 UTC

README

How to use;

Install through composer

composer require coas/tcu  

Using the package

Use Coas/TCU/TCU;

$tcu = new TCU(username, token, instutionCode, inJson);

username ( string ) = TCU username
token ( string ) = TCU secret token credential
instutionCode ( string ) = Institute code or null ( defaults to username )
inJson ( bool ) = Tells to return results as a json object, set to false return the original xml response

//Example
$response = $tcu->checkStatus(‘indexNumber’); // Returns XML response as a json object 

if you wish to return the original XML

$tcu->inJson(false);

or pass the fourth parameter as false

$tcu = new TCU(username, token, null, false);

Response

$response = $tcu->add(category,indexF4, indexF6, otherForm4, otherFormSix );

$status = $response->RESPONSE->RESPONSEPARAMETERS->STATUS;
$code = $response->RESPONSE->RESPONSEPARAMETERS->ERROR_CODE;
$description = $response->RESPONSE->RESPONSEPARAMETERS->STATUS_DESCRIPTION;

Methods All methods as defined in the original TCU document API