OXID eShop CE  4.10.4
 All Classes Namespaces Files Functions Variables Pages
oxOnlineVatIdCheck Class Reference
+ Inheritance diagram for oxOnlineVatIdCheck:
+ Collaboration diagram for oxOnlineVatIdCheck:

Public Member Functions

 __construct ()
 validate (oxCompanyVatIn $oVatIn)
 checkUid ($sCompVatId)
 catchWarning ($iErrNo, $sErrStr, $sErrFile, $iErrLine)
 getWsdlUrl ()
 isDisabled ()
- Public Member Functions inherited from oxCompanyVatInChecker
 setError ($sError)
 getError ()

Public Attributes

const BUSY_RETRY_CNT = 1
const BUSY_RETRY_WAITUSEC = 500000

Protected Member Functions

 _parseError ($sErrorMsg)
 _isServiceAvailable ()
 _checkOnline ($oCheckVat)
 _getError ()

Protected Attributes

 $_blServiceIsOn = null
 $_sWsdl = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'
- Protected Attributes inherited from oxCompanyVatInChecker
 $_sError = ''

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$oCheckVatvat 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::_parseError (   $sErrorMsg)
protected

Parses error and throws exception for it

Parameters
string$sErrorMsgerror message
Deprecated:
since v5.2 (2014-07-28); This logic was moved to oxCompanyVatInValidator
Exceptions
oxConnectionException

Definition at line 79 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$iErrNoerror type number
string$sErrStrerror message
string$sErrFileerror file
int$iErrLineerror 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$sCompVatIdvat 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$oVatInCompany VAT identification number object.
Returns
bool

Reimplemented from oxCompanyVatInChecker.

Definition at line 56 of file oxonlinevatidcheck.php.

Member Data Documentation

oxOnlineVatIdCheck::$_aVatCheckCache = array()
staticprotected

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.

const oxOnlineVatIdCheck::BUSY_RETRY_CNT = 1

How many times to retry check if server is busy

Definition at line 27 of file oxonlinevatidcheck.php.

const oxOnlineVatIdCheck::BUSY_RETRY_WAITUSEC = 500000

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: