lnbits paid articles added

This commit is contained in:
HolgerHatGarKeineNode
2023-03-13 21:38:12 +01:00
parent 094825ee20
commit 603c7d85b9
2 changed files with 2 additions and 4 deletions

View File

@@ -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()

View File

@@ -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'],
])