mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-19 06:44:19 +01:00
rename python_snippets folder to python
.
This commit is contained in:
15
snippets/python/src/receive_payment.py
Normal file
15
snippets/python/src/receive_payment.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import breez_sdk
|
||||
|
||||
|
||||
def receive_payment(sdk_services):
|
||||
try:
|
||||
# ANCHOR: receive-payment
|
||||
req = breez_sdk.ReceivePaymentRequest(
|
||||
amount_msat=3000000,
|
||||
description="Invoice for 3 000 000 sats")
|
||||
result = sdk_services.receive_payment(req)
|
||||
# ANCHOR_END: receive-payment
|
||||
return result
|
||||
except Exception as error:
|
||||
print(error)
|
||||
raise
|
||||
Reference in New Issue
Block a user