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:
@@ -71,7 +71,7 @@ class InternArticleView extends Component
|
||||
|
||||
public function checkPaymentHash()
|
||||
{
|
||||
$invoice = $this->check($this->checkid ?? $this->checkThisPaymentHash);
|
||||
$invoice = $this->check($this->checkid ?? $this->checkThisPaymentHash, $this->libraryItem->createdBy->lnbits);
|
||||
if (isset($invoice['paid']) && $invoice['paid']) {
|
||||
$this->invoicePaid = true;
|
||||
auth()
|
||||
|
||||
@@ -30,10 +30,8 @@ trait LNBitsTrait
|
||||
return $response->json();
|
||||
}
|
||||
|
||||
public function check($paymentHash)
|
||||
public function check($paymentHash, $lnbits)
|
||||
{
|
||||
$lnbits = auth()->user()->lnbits;
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'X-Api-Key' => $lnbits['read_key'],
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user