PHP code example of giannisftaras / speedex-api

1. Go to this page and download the library: Download giannisftaras/speedex-api 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/ */

    

giannisftaras / speedex-api example snippets




eedexAPI\SpeedexAPI;

$sp_api = new SpeedexAPI();
$voucher_id = '<THE VOUCHER NUMBER>';
$voucher = $sp_api->get_voucher($voucher_id);

if ($voucher->is_valid()) {
	var_dump($voucher->get_data());
	var_dump($voucher->is_delivered());
}


$options = [
    'cache' => 2
];
$sp_api = new SpeedexAPI($options);