drahosistvan/vatvalidation

A simple wrapper for VIES VAT Validation WebService.

1.0.2 2018-03-21 13:45 UTC

This package is not auto-updated.

Last update: 2024-11-10 05:19:29 UTC


README

Build Status codecov Latest Stable Version Total Downloads StyleCI License

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());