mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
Add snippets
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.example.kotlinmpplib
|
||||
|
||||
import breez_sdk.*
|
||||
class ServiceStatus {
|
||||
fun Webhook(sdk: BlockingBreezServices) {
|
||||
// ANCHOR: register-webook
|
||||
try {
|
||||
sdk.registerWebhook("https://yourapplication.com")
|
||||
} catch (e: Exception) {
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: register-webook
|
||||
}
|
||||
|
||||
fun paymentWebhook(sdk: BlockingBreezServices) {
|
||||
// ANCHOR: register-payment-webook
|
||||
try {
|
||||
sdk.registerWebhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>")
|
||||
} catch (e: Exception) {
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: register-payment-webook
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user