-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
fsociety
committed
Sep 10, 2024
1 parent
18032ad
commit cf15c22
Showing
3 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |