Quittio 0.3 API

EpcGiroCodeGenerator
in package
implements PaymentQrGenerator

FinalYes

EPC QR code ("GiroCode") for SEPA credit transfers, guideline EPC069-12 version 002.

Created when the currency is EUR, the payment means is a credit transfer with an IBAN and the amount due is positive; never for credit notes and self-billed invoices.

Options of payload(): "amount" (due|discounted), "value" (a BigDecimal that replaces the amount, e.g. the total of a payment reminder) and "remittance" (replaces BT-83).

Table of Contents

Interfaces

PaymentQrGenerator
Creates the payload of a payment QR code (GiroCode, Swiss QR bill, …).

Constants

AMOUNT_DISCOUNTED  : string = 'discounted'
AMOUNT_DUE  : string = 'due'
MAX_BYTES  : int = 331
Maximum size of the payload in bytes (EPC069-12, section 5.2).

Methods

amount()  : BigDecimal|null
Amount due, or the amount after the first cash discount.
discountedAmount()  : BigDecimal|null
Amount due after the given cash discount (on its base amount, or on the amount due).
key()  : string
payload()  : string|null
Text content of the QR code, or null if no code can be created.
supports()  : bool

Constants

MAX_BYTES

Maximum size of the payload in bytes (EPC069-12, section 5.2).

public int MAX_BYTES = 331

Methods

amount()

Amount due, or the amount after the first cash discount.

public amount(InvoiceData $invoice[, bool $discounted = false ]) : BigDecimal|null
Parameters
$invoice : InvoiceData
$discounted : bool = false
Return values
BigDecimal|null

payload()

Text content of the QR code, or null if no code can be created.

public payload(InvoiceData $invoice[, array<string|int, mixed> $options = [] ]) : string|null
Parameters
$invoice : InvoiceData
$options : array<string|int, mixed> = []
Return values
string|null
On this page

Search results