PHP code example of bolivir / vat

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

    

bolivir / vat example snippets


$VAT = new \Bolivir\Vat\Vat();
$response = $VAT->validateFormat('FR12345678901');

Bolivir\Vat\VatFormatValidationResponse {
-countryCode: string
-vatNumber: string
-valid: boolean
}

$VAT = new \Bolivir\Vat\Vat();
echo $VAT->validate('FR12345678901');

Bolivir\Vat\VatValidationResponse {
-countryCode: string
-vatNumber: string
-requestDate: string
-valid: boolean
-name: string
-address: string
}