composer require thewulf7/travel-payouts
or add to your composer.json file, in the "require" section
"thewulf7/travel-payouts": "1.1.*"
First of all create main Travel object and pass your token in it
use thewulf7\travelPayouts\Travel;
$travel = new Travel('YOUR TOKEN HERE');
Then you can use it get different services
$ticketService = $travel->getTicketsService();
//Get flights found by our users in the last 48 hours from LED to MOW. Return array consists of thewulf7\travelPayouts\Ticket objects.
$flights = $ticketService->getLatestPrices('LED', 'MOW', false, 'rub', 'year', 1, 10);
See documentation
$flightService = $travel->getFlightService();
$flightService
->setIp('127.0.0.1')
->setHost('aviasales.ru')
->setMarker('123')
->addPassenger('adults', 2)
->addSegment('LED', 'MOW', '2016-02-01');
$searchData = $flightService->search('ru', 'Y');
$searchResults = $flightService->getSearchResults($searchData['search_id']);
$partnerService = $travel->getPartnerService();
//get user balance and currency of the balance
list($balance, $currency) = $partnerService->getBalance();
$dataService = $travel->getDataService();
//get all airports in the system
$airports = $dataService->getAirports();