mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
Add snippets
This commit is contained in:
14
snippets/dart_snippets/lib/webhook.dart
Normal file
14
snippets/dart_snippets/lib/webhook.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
import 'package:breez_sdk/breez_sdk.dart';
|
||||
import 'package:breez_sdk/bridge_generated.dart';
|
||||
|
||||
Future<void> webhook() async {
|
||||
// ANCHOR: register-webook
|
||||
await BreezSDK().registerWebhook("https://yourapplication.com");
|
||||
// ANCHOR_END: register-webook
|
||||
}
|
||||
|
||||
Future<void> paymentWebhook({required String paymentHash}) async {
|
||||
// ANCHOR: register-payment-webook
|
||||
await BreezSDK().registerWebhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>");
|
||||
// ANCHOR_END: register-payment-webook
|
||||
}
|
||||
Reference in New Issue
Block a user