Verifactu-PHP

AeatClient

Class to communicate with the AEAT web service endpoint for VERI*FACTU

Table of Contents

Constants

NS_AEAT  = 'https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd'
Client XML namespace
NS_SOAPENV  = 'http://schemas.xmlsoap.org/soap/envelope/'
SOAP envelope XML namespace

Methods

__construct()  : mixed
Class constructor
send()  : PromiseInterface<string|int, AeatResponse>
Send invoicing records
setCertificate()  : $this
Set certificate
setEntitySeal()  : $this
Set entity seal
setProduction()  : $this
Set production environment
setRepresentative()  : $this
Set representative
setRequirementReference()  : $this
Set requirement reference
setVoluntaryRemissionEndDate()  : $this
Set end date of voluntary remission

Constants

NS_AEAT

Client XML namespace

public mixed NS_AEAT = 'https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd'

NS_SOAPENV

SOAP envelope XML namespace

public mixed NS_SOAPENV = 'http://schemas.xmlsoap.org/soap/envelope/'

Methods

__construct()

Class constructor

public __construct(ComputerSystem $system, FiscalIdentifier $taxpayer[, Client|null $httpClient = null ]) : mixed
Parameters
$system : ComputerSystem

Computer system details

$taxpayer : FiscalIdentifier

Taxpayer details (party that issues the invoices)

$httpClient : Client|null = null

Custom HTTP client, leave empty to create a new one

setCertificate()

Set certificate

public setCertificate(string $certificatePath[, string|null $certificatePassword = null ]) : $this

NOTE: The certificate path must have the ".p12" extension to be recognized as a PFX bundle.

Parameters
$certificatePath : string

Path to encrypted PEM certificate or PKCS#12 (PFX) bundle

$certificatePassword : string|null = null

Certificate password or null for none

Return values
$this

This instance

setEntitySeal()

Set entity seal

public setEntitySeal(bool $entitySeal) : $this
Parameters
$entitySeal : bool

Pass true for entity seal certificate, false for regular certificate

Return values
$this

This instance

setProduction()

Set production environment

public setProduction(bool $production) : $this
Parameters
$production : bool

Pass true for production, false for testing

Return values
$this

This instance

setRepresentative()

Set representative

public setRepresentative(FiscalIdentifier|null $representative) : $this

NOTE: Requires the represented fiscal entity to fill the "GENERALLEY58" form at AEAT.

Parameters
$representative : FiscalIdentifier|null

Representative details (party that sends the invoices)

Return values
$this

This instance

setRequirementReference()

Set requirement reference

public setRequirementReference(string|null $requirementReference[, bool $isLastRequirementSubmission = false ]) : $this

Mandatory in case a of a non-voluntary remission upon request by the AEAT ("remisión por requerimiento"). Otherwise must be unset.

Parameters
$requirementReference : string|null

Requirement reference or null to clear

$isLastRequirementSubmission : bool = false

Whether there are no more records to submit after this remission

Return values
$this

This instance

setVoluntaryRemissionEndDate()

Set end date of voluntary remission

public setVoluntaryRemissionEndDate(DateTimeImmutable|null $endDate[, bool $isAffectedByIncident = false ]) : $this
Parameters
$endDate : DateTimeImmutable|null

End date (time part will be ignored) or null to clear

$isAffectedByIncident : bool = false

Whether voluntary remission was at some point affected by a technical incident

Return values
$this

This instance


        
On this page

Search results