Verifactu-PHP

AeatClient
in package

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

Table of Contents

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

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


        
On this page

Search results