PHP code example of taitech / travfd-php

1. Go to this page and download the library: Download taitech/travfd-php 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/ */

    

taitech / travfd-php example snippets



use Taitech\TravfdPhp\Facades\Travfd;
$response = Trarfd::registerVfd();
print_r($response);



$response = Travfd::getValidToken();
print_r($response);



$receiptData = [
    'Invoice' => [
        'TIN' => '123456789',
        'Date' => '2025-02-22',
        'Total' => '1000.00'
    ]
];
$response = Travfd::sendReceipt($receiptData);
print_r($response);



$response = Travfd::sendZReport([
    'TIN' => '123456789',
    'Date' => '2025-02-22',
    'TotalSales' => '5000.00'
]);
print_r($response);



$response = Travfd::verifyReceipt('INV-12345');
print_r($response);

sh

php artisan vendor:publish --tag=config