OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Core\OnlineVatIdCheck Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Core\OnlineVatIdCheck:
+ Collaboration diagram for OxidEsales\EshopCommunity\Core\OnlineVatIdCheck:

Public Member Functions

 __construct ()
 
 validate (\OxidEsales\Eshop\Application\Model\CompanyVatIn $oVatIn)
 
 catchWarning ($iErrNo, $sErrStr, $sErrFile, $iErrLine)
 
 getWsdlUrl ()
 

Public Attributes

const BUSY_RETRY_CNT = 1
 
const BUSY_RETRY_WAITUSEC = 500000
 

Protected Member Functions

 _isServiceAvailable ()
 
 _checkOnline ($oCheckVat)
 

Protected Attributes

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

Static Protected Attributes

static $_aVatCheckCache = []
 

Detailed Description

Online VAT id checker class.

Constructor & Destructor Documentation

◆ __construct()

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::__construct ( )

Class constructor.

Member Function Documentation

◆ _checkOnline()

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::_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

◆ _isServiceAvailable()

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::_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

◆ catchWarning()

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::catchWarning (   $iErrNo,
  $sErrStr,
  $sErrFile,
  $iErrLine 
)

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

Deprecated:
since v6.3.0 (2018-04-24); This method won't return a value in future.
Parameters
int$iErrNoerror type number
string$sErrStrerror message
string$sErrFileerror file
int$iErrLineerror line
Returns
bool

◆ getWsdlUrl()

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::getWsdlUrl ( )

Returns wsdl url

Returns
string

◆ validate()

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::validate ( \OxidEsales\Eshop\Application\Model\CompanyVatIn  $oVatIn)

Validates VAT.

Parameters
\OxidEsales\Eshop\Application\Model\CompanyVatIn$oVatInCompany VAT identification number object.
Returns
bool

Member Data Documentation

◆ $_aVatCheckCache

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::$_aVatCheckCache = []
staticprotected

◆ $_blServiceIsOn

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::$_blServiceIsOn = null
protected

◆ $_sWsdl

OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::$_sWsdl = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'
protected

◆ BUSY_RETRY_CNT

const OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::BUSY_RETRY_CNT = 1

How many times to retry check if server is busy

◆ BUSY_RETRY_WAITUSEC

const OxidEsales\EshopCommunity\Core\OnlineVatIdCheck::BUSY_RETRY_WAITUSEC = 500000

How much to wait between retries (in micro seconds)


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