drahosistvan / vatvalidation
A simple wrapper for VIES VAT Validation WebService.
Installs: 193 421
Dependents: 0
Suggesters: 0
Security: 0
Stars: 13
Watchers: 6
Forks: 6
Open Issues: 0
Requires
- php: >=5.0.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2
- phpunit/phpunit: ~5.0
This package is not auto-updated.
Last update: 2024-11-10 05:19:29 UTC
README
Installation
Simply require the package via composer:
composer require drahosistvan/vatvalidation
How to use
$validation = new VatValidation(); $validation->validate('UK123321213'); if ($validation->valid) { print $validation->name; print $validation->address; print $validation->countryCode; print $validation->vatNumber; print $validation->valid; }
It has a toArray
method, so you can cast the validation data to an array.
$validation = new VatValidation(); $validation->validate('UK123321213'); var_dump($validation->toArray());