mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
Consolidate "receive payment" snippets, expose invoice
This commit is contained in:
@@ -5,10 +5,12 @@ class ReceivePayment {
|
||||
fun receive_payment(sdk: BlockingBreezServices) {
|
||||
// ANCHOR: receive-payment
|
||||
try {
|
||||
val invoice = sdk.receivePayment(ReceivePaymentRequest(
|
||||
val receivePaymentResponse = sdk.receivePayment(ReceivePaymentRequest(
|
||||
3_000_000.toULong(),
|
||||
"Invoice for 3000 sats",
|
||||
))
|
||||
|
||||
val invoice = receivePaymentResponse.lnInvoice;
|
||||
} catch (e: Exception) {
|
||||
// handle error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user