mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
paynym support added
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user