mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
lnbits paid articles added
This commit is contained in:
@@ -45,7 +45,8 @@ class InternArticleView extends Component
|
||||
{
|
||||
$invoice = $this->createInvoice(
|
||||
sats: $this->libraryItem->sats,
|
||||
memo: 'Payment for: "'.$this->libraryItem->slug.'" on Einundzwanzig Portal.'
|
||||
memo: 'Payment for: "'.$this->libraryItem->slug.'" on Einundzwanzig Portal.',
|
||||
lnbits: $this->libraryItem->createdBy->lnbits,
|
||||
);
|
||||
session('payment_hash_article_'.$this->libraryItem->id, $invoice['payment_hash']);
|
||||
$this->paymentHash = $invoice['payment_hash'];
|
||||
|
||||
@@ -16,10 +16,8 @@ trait LNBitsTrait
|
||||
return $response->status() === 200;
|
||||
}
|
||||
|
||||
public function createInvoice($sats, $memo)
|
||||
public function createInvoice($sats, $memo, $lnbits)
|
||||
{
|
||||
$lnbits = auth()->user()->lnbits;
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'X-Api-Key' => $lnbits['read_key'],
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user