PHP code example of goosfraba / vies-eu-vat-checker
1. Go to this page and download the library: Download goosfraba/vies-eu-vat-checker 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/ */
goosfraba / vies-eu-vat-checker example snippets
use Goosfraba\ViesEuVatChecker\CheckVatSoapApi;
$api = CheckVatSoapApi::create();
use Goosfraba\ViesEuVatChecker\CheckVatSoapApi;
use Goosfraba\ViesEuVatChecker\Wsdl;
$api = CheckVatSoapApi::create(Wsdl::test());
use Goosfraba\ViesEuVatChecker\CheckVatSoapApi;
use Goosfraba\ViesEuVatChecker\CheckVatRequest;
$response = $api->checkVat(new CheckVatRequest("LU", "20260743")); // CheckVatResponse
$response->isValid(); // bool - is given VAT number valid
$response->countryCode(); // string - requested number country code
$response->vatNumber(); // string - requested VAT number
$response->requestDate(); // \DateTime - request date
$response->name(); // string - company's name
$response->address(); // string - company's address