bussystem.eu API PHP SDK
BusSystem is bus transport control system
Installation
Install nikba/bus-system-php-sdk with php composer
composer require nikba/bus-system-php-sdk
Usage/Examples
$bussystem = new \Nikba\BusSystemPhpSdk\BusSystem(
'BASE URL',
'LOGIN',
'PASSWORD',
'en'
);
# Get All Countries
$params = ['viev' => 'get_country'];
$points = $bussystem->getPoints($params);
Web-service function:
get_points — selection of available cities, countries, as well as dynamically linked ones (united with the outdated function get_country, an optional function)
get_routes — Information about ALL available routes within selected interval of cities as on the specified date
get_plan — Plan places in the bus (ALL ROUTES, an optional function)
get_free_seats — Search number seats (bus and train) and search wagons for train. (Required for train)
get_discount — List of discounts for route (optional function)
get_all_routes — Timetable of route (optional function)
new_order — Creating a new order for the period depending on the terms of lock_min (generally 10 minutes). Upon the expiry of lock_min, the order will be automatically cancelled. Some routes allow blocking the seats for the indicated time. Moreover, some routes may be paid for even upon the expiry of lock_min, but this does not guarantee a successful sale and the specified seat (might be changed).
buy_ticket — Sale of tickets based on the generated order (item 3. new_order)
cancel_ticket — Order cancellation and ticket refund (united with the outdated function cancel_order)
get_ticket — Getting full information about a ticket (an optional function)
get_orer — Getting full information about a order
print_ticket — Getting an e-ticket form (confirmation for the carrier can be of different designs, depending on the selected route). The passenger must show this very form on the bus, and not a receipt from the terminal, bank, etc, otherwise the passenger may be denied a trip.
get_orders — Order list (if applicable payment)
get_tickets — List of tickets (if applicable payment)
get_tickets (dispatcher) — List of tickets for carriers and dispatchers
get_cash — Cash (if applicable payment)
In all the above requests, it is recommended to send the tag session=xxxx (user session) - this is how you can get routes where this tag is required.
Support