mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
feat(payment): add WebLN payment functionality
Implemented functionality to create an invoice and make payment using WebLN. Also added error handling and logging for payment process. Updated UI to display payment information and a button to initiate payment.
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
<div x-data="webln(@this)">
|
||||
<webview id="webln-webview" src="https://webln-capable-site.com" style="width:100%; height:100%;"></webview>
|
||||
<div x-data="webln(@this)" class="p-2 sm:p-4" wire:ignore>
|
||||
<div class="font-mono space-y-1 p-2 sm:p-4 text-white break-words">
|
||||
<div class="text-xs sm:text-base break-words">Test Payment from WebLN to The Ben</div>
|
||||
<div class="text-xs sm:text-base break-words">1 sat</div>
|
||||
<div class="text-xs sm:text-base break-words">hash: {{ $invoice['payment_hash'] }}</div>
|
||||
<div class="text-xs sm:text-base break-words">payment_request: {{ $invoice['payment_request'] }}</div>
|
||||
<div class="mt-6">
|
||||
<div class="flex justify-center">
|
||||
<button x-on:click="pay" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Pay Invoice</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user