Class CompanyVatIdEu
Responsibility: Validate company VAT ID for EU states by requesting VEIS EU system by SOAP (or by GET if SOAP not implemented). - This class adds dependence on your application - APPLICATION HAS TO BE ONLINE when submitting your forms!
- MvcCore\Ext\Forms\Validator implements MvcCore\Ext\Forms\IValidator
-
MvcCore\Ext\Forms\Validators\CompanyVatIdEu
See: http://ec.europa.eu/taxation_customs/vies/
Located at ext-form-validator-special/src/MvcCore/Ext/Forms/Validators/CompanyVatIdEu.php
public
string|null
|
|
protected
string|null
|
#
checkEuVatNumber( string $localeCode, string $notCheckedValue )
Decode if to validate by SOAP or by GET, SOAP is more confident source. If you want to assign values into another form fields by SOAP or GET response, you can extend this class and this method to do it. |
protected
stdClass|null
|
#
checkEuVatNumberBySoap( string $localeCode, string $notCheckedValue )
Request VEIS by SOAP and get company info as |
protected
stdClass|null
|
#
checkEuVatNumberByGet( string $localeCode, string $notCheckedValue )
Request VEIS by GET, parse HTML response and get company info as |
CreateInstance(),
GetErrorMessage(),
SetField(),
SetForm(),
__construct(),
setUpFieldProps(),
throwNewInvalidArgumentException()
|
string |
SOAP_URL
Main SOAP URL to EU VEIS system. |
#
'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'
|
string |
GET_URL
Backup GET request URL to EU VEIS system if |
#
'http://ec.europa.eu/taxation_customs/vies/vatResponse.html?&action=check&check=Verify&memberStateCode={0}&number={1}'
|
integer |
ERROR_VAT_ID
Error message index(es). |
#
0
|
integer |
ERROR_TAX_ID
|
#
1
|
protected static
array
|
$errorMessages
Validation failure message template definitions. |
#
[
self::ERROR_VAT_ID => "Field '{0}' requires a valid VAT ID.",
self::ERROR_TAX_ID => "Field '{0}' requires a valid TAX ID.",
]
|
$field,
$fieldSpecificProperties,
$form,
$toolClass
|