paynym support added

This commit is contained in:
HolgerHatGarKeineNode
2023-03-17 11:49:11 +01:00
parent d9bf8a730a
commit 6979c554bc
20 changed files with 147 additions and 12 deletions

View File

@@ -26,6 +26,8 @@ class InternArticleView extends Component
public bool $invoicePaid = false;
public bool $alreadyPaid = false;
public ?string $payNymQrCode = '';
public function mount()
{
$this->libraryItem->load([
@@ -42,6 +44,22 @@ class InternArticleView extends Component
->count() > 0) {
$this->invoicePaid = true;
}
if ($this->libraryItem->lecturer->paynym) {
$this->payNymQrCode = base64_encode(QrCode::format('png')
->size(300)
->merge($this->libraryItem->lecturer->getFirstMedia('avatar')
? str(
$this->libraryItem
->lecturer
->getFirstMediaPath('avatar'))
->replace('/home/einundzwanzig/portal.einundzwanzig.space',
''
)
: '/public/img/einundzwanzig.png',
.3)
->errorCorrection('H')
->generate($this->libraryItem->lecturer->paynym));
}
}
public function pay()