Zum Inhalt springen

API reference / Quittio \ Core \ Pdf \ Qr

PaymentQrGenerator

interface in quittio/core

Quittio\Core\Pdf\Qr\PaymentQrGenerator · Source

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

Methods#

MethodDescription
->key()Payment QR code type of the generator, e.g. "girocode" or "swiss-qr-bill". A presentation that asks for this type uses the generator of the country pack with this key.
->payload()Text content of the QR code, or null if no code can be created.
->supports()Whether the invoice qualifies for the code (currency, payment means, amount due …). Without it no code is printed, unless an explicit amount is given (payment reminders).

key()#

public function key(): string

Payment QR code type of the generator, e.g. "girocode" or "swiss-qr-bill". A presentation that asks for this type uses the generator of the country pack with this key.

Returns
string

payload()#

public function payload(InvoiceData $invoice, array<string, mixed> $options = []): ?string

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

ParameterTypeDescription
$invoiceInvoiceData
$optionsarray<string, mixed> = []
Returns
?string

supports()#

public function supports(InvoiceData $invoice): bool

Whether the invoice qualifies for the code (currency, payment means, amount due …). Without it no code is printed, unless an explicit amount is given (payment reminders).

ParameterTypeDescription
$invoiceInvoiceData
Returns
bool

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.