1. Go to this page and download the library: Download abame/travel-payouts 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/ */
abame / travel-payouts example snippets
use TravelPayouts\Travel;
$travel = new Travel('YOUR TOKEN HERE');
$ticketService = $travel->getTicketsService();
//Get flights found by our users in the last 48 hours from PAR to FRA. Return array consists of TravelPayouts\Ticket objects.
$flights = $ticketService->getLatestPrices('PAR', 'FRA', false, 'eur', 'year', 1, 10);
$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();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.