Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes

oxOnlineVatIdCheck Class Reference

Inheritance diagram for oxOnlineVatIdCheck:
Collaboration diagram for oxOnlineVatIdCheck:

List of all members.

Public Member Functions

 __construct ()
 validate (oxCompanyVatIn $oVatIn)
 checkUid ($sCompVatId)
 catchWarning ($iErrNo, $sErrStr, $sErrFile, $iErrLine)
 getWsdlUrl ()
 isDisabled ()

Public Attributes

const BUSY_RETRY_CNT = 1
const BUSY_RETRY_WAITUSEC = 500000

Protected Member Functions

 _isServiceAvailable ()
 _checkOnline ($oCheckVat)
 _getError ()

Protected Attributes

 $_blServiceIsOn = null
 $_sWsdl = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'

Static Protected Attributes

static $_aVatCheckCache = array()

Detailed Description

Online VAT id checker class.

Definition at line 6 of file oxonlinevatidcheck.php.


Constructor & Destructor Documentation

oxOnlineVatIdCheck.__construct (  ) 

Class constructor.

Definition at line 45 of file oxonlinevatidcheck.php.


Member Function Documentation

oxOnlineVatIdCheck._checkOnline ( oCheckVat  )  [protected]

Checks online if USt.ID number is valid. Returns true on success. On error sets error value.

Parameters:
object $oCheckVat vat object
Returns:
bool

Definition at line 202 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck._getError (  )  [protected]

Get error message.

Deprecated:
since v5.2 (2014-07-28); This logic was moved to oxCompanyVatInValidator
Returns:
string

Definition at line 249 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck._isServiceAvailable (  )  [protected]

Checks if VAT check can be performed:

  • if SoapClient class exists;
  • if service returns any output;
  • if output, returned by service, is valid.
Returns:
bool

Definition at line 165 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck.catchWarning ( iErrNo,
sErrStr,
sErrFile,
iErrLine 
)

Catches soap warning which is usually thrown due to service problems. Return true and allows to continue process

Parameters:
int $iErrNo error type number
string $sErrStr error message
string $sErrFile error file
int $iErrLine error line
Returns:
bool

Definition at line 144 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck.checkUid ( sCompVatId  ) 

Checks if USt.ID number is valid. Returns true on success

Parameters:
string $sCompVatId vat id that should be checked
Deprecated:
since v5.2 (2014-07-28); use validate method
Exceptions:
oxInputException,oxConnectionException 
Returns:
bool

Definition at line 107 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck.getWsdlUrl (  ) 

Returns wsdl url

Returns:
string

Definition at line 266 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck.isDisabled (  ) 

Returns true if VAT id check is disabled

Deprecated:
since v5.2 (2014-07-28); This logic was moved to oxCompanyVatInValidator
Returns:
bool

Definition at line 283 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck.validate ( oxCompanyVatIn oVatIn  ) 

Validates VAT.

Parameters:
oxCompanyVatIn $oVatIn Company VAT identification number object.
Returns:
bool

Reimplemented from oxCompanyVatInChecker.

Definition at line 56 of file oxonlinevatidcheck.php.


Member Data Documentation

oxOnlineVatIdCheck.$_aVatCheckCache = array() [static, protected]

Definition at line 21 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck.$_blServiceIsOn = null [protected]

Definition at line 14 of file oxonlinevatidcheck.php.

oxOnlineVatIdCheck.$_sWsdl = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl' [protected]

Definition at line 40 of file oxonlinevatidcheck.php.

How many times to retry check if server is busy

Definition at line 27 of file oxonlinevatidcheck.php.

How much to wait between retries (in micro seconds)

Definition at line 33 of file oxonlinevatidcheck.php.


The documentation for this class was generated from the following file: