项目作者: Fur7

项目描述 :
VIES Europe VAT number validation
高级语言: PHP
项目地址: git://github.com/Fur7/VAT-vies-validate.git
创建时间: 2019-07-05T15:14:40Z
项目社区:https://github.com/Fur7/VAT-vies-validate

开源协议:MIT License

下载


VIES Europe VAT number validation

You can verify the validity of a VAT number issued by any Member State by providing that Member State ISO and entering the VAT number to be validated.

Usage

When you have the full VAT number:

  1. $vat = new vatNumber("HERE_VAT_NUMBER");

When the first part is missing, use the second parameter to complete it:

  1. $vat = new vatNumber("HERE_VAT_NUMBER","HERE_COUNTRY_ISO");

Country ISO for example: DE, FR, NL, IT etc.

The third parameter can be used to always use the second parameter as ISO:

  1. $vat = new vatNumber("HERE_VAT_NUMBER","HERE_COUNTRY_ISO",true);

Parameters:

  1. @param string $number : Full VAT number.
  2. @param char(2) $iso : ISO, example EN,FR,NL etc.
  3. @param boolean $forceCountry : True if you want to force to use the $iso.
  4. @param boolean $status : True if you want to check the connection.
  5. @return array