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#
| Method | Description |
|---|---|
->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(): stringPayment 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 = []): ?stringText content of the QR code, or null if no code can be created.
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$options | array<string, mixed> = [] |
- Returns
?string
supports()#
public function supports(InvoiceData $invoice): boolWhether 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).
| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData |
- Returns
bool