FacturaScripts

Vies extends Vies
in package

Class created by Core/Internal/PluginsDeploy

Table of Contents

Constants

EU_COUNTRIES  = ['AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'EL', 'ES', 'FI', 'FR', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK']
RESULT_ERROR  = -1
RESULT_INVALID  = 0
RESULT_VALID  = 1
VIES_URL  = "https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"

Methods

check()  : int
getLastError()  : string
simulateViesResponse()  : void
Simula una respuesta del servicio VIES para usar en pruebas unitarias.

Constants

EU_COUNTRIES

public mixed EU_COUNTRIES = ['AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'EL', 'ES', 'FI', 'FR', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', 'PL', 'PT', 'RO', 'SE', 'SI', 'SK']

RESULT_ERROR

public mixed RESULT_ERROR = -1

RESULT_INVALID

public mixed RESULT_INVALID = 0

RESULT_VALID

public mixed RESULT_VALID = 1

VIES_URL

public mixed VIES_URL = "https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl"

Methods

check()

public static check(string $cifnif, string $codiso[, bool $msg = true ]) : int
Parameters
$cifnif : string
$codiso : string
$msg : bool = true
Return values
int

getLastError()

public static getLastError() : string
Return values
string

simulateViesResponse()

Simula una respuesta del servicio VIES para usar en pruebas unitarias.

public static simulateViesResponse(int|null $response) : void

Este método solo debe utilizarse en el contexto de pruebas.

Parameters
$response : int|null

Vies::RESULT_VALID para simular un número de IVA válido, Vies::RESULT_INVALID para simular un número de IVA inválido, Vies::RESULT_ERROR para simular un error, null para volver al comportamiento normal


        
On this page

Search results