PHP code example of beekalam / nira-gateway

1. Go to this page and download the library: Download beekalam/nira-gateway library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

beekalam / nira-gateway example snippets


$ngs = new NiraGatewaySpecification("<domain>/ws1", "<domain>/ws2/cgi-bin/NRSWEB.cgi", '<username>', '<password>');
$ng = new NiraGateway($ngs);

$searchParameters = ParameterBuilder::fromArray([
        'airline' => '<your_airline>',
        'cbSource' => 'SYZ' 
        'cbTarget' => 'THR',
        'cbDay1' => '1',
        'cbMonth1' => '12'
        'cbAdultQty' => '1'
        'cbInfantQty' => '1'
        'cbChildQty' => '0'
]);

$responseBody = $ng->search($searchParameters);
FlightParser::fromJson($responseBody);