mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
fix snippets
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
using Breez.Sdk;
|
using Breez.Sdk;
|
||||||
|
|
||||||
public class ServiceStatusSnippets
|
public class WebhooksSnippets
|
||||||
{
|
{
|
||||||
public void HealthCheckStatus(BlockingBreezServices sdk)
|
public void HealthCheckStatus(BlockingBreezServices sdk)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,12 +3,12 @@ import 'package:breez_sdk/bridge_generated.dart';
|
|||||||
|
|
||||||
Future<void> webhook() async {
|
Future<void> webhook() async {
|
||||||
// ANCHOR: register-webook
|
// ANCHOR: register-webook
|
||||||
await BreezSDK().registerWebhook("https://yourapplication.com");
|
await BreezSDK().registerWebhook(webhookUrl: "https://yourapplication.com");
|
||||||
// ANCHOR_END: register-webook
|
// ANCHOR_END: register-webook
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> paymentWebhook({required String paymentHash}) async {
|
Future<void> paymentWebhook({required String paymentHash}) async {
|
||||||
// ANCHOR: register-payment-webook
|
// ANCHOR: register-payment-webook
|
||||||
await BreezSDK().registerWebhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>");
|
await BreezSDK().registerWebhook(webhookUrl: "https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>");
|
||||||
// ANCHOR_END: register-payment-webook
|
// ANCHOR_END: register-payment-webook
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.example.kotlinmpplib
|
package com.example.kotlinmpplib
|
||||||
|
|
||||||
import breez_sdk.*
|
import breez_sdk.*
|
||||||
class ServiceStatus {
|
class Webhooks {
|
||||||
fun Webhook(sdk: BlockingBreezServices) {
|
fun Webhook(sdk: BlockingBreezServices) {
|
||||||
// ANCHOR: register-webook
|
// ANCHOR: register-webook
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { registerWebhook } from '@breeztech/react-native-breez-sdk'
|
|||||||
|
|
||||||
const webhook = async () => {
|
const webhook = async () => {
|
||||||
// ANCHOR: register-webook
|
// ANCHOR: register-webook
|
||||||
await registerWebhook("https://yourapplication.com")
|
await registerWebhook('https://yourapplication.com')
|
||||||
// ANCHOR_END: register-webook
|
// ANCHOR_END: register-webook
|
||||||
}
|
}
|
||||||
|
|
||||||
const paymentWebhook = async () => {
|
const paymentWebhook = async () => {
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import BreezSDK
|
|||||||
|
|
||||||
func webhook(sdk: BlockingBreezServices) throws {
|
func webhook(sdk: BlockingBreezServices) throws {
|
||||||
// ANCHOR: register-webook
|
// ANCHOR: register-webook
|
||||||
sdk.registerWebhook("https://yourapplication.com")
|
sdk.registerWebhook(webhookUrl: "https://yourapplication.com")
|
||||||
// ANCHOR_END: register-webook
|
// ANCHOR_END: register-webook
|
||||||
}
|
}
|
||||||
|
|
||||||
func paymentWebhook(sdk: BlockingBreezServices) {
|
func paymentWebhook(sdk: BlockingBreezServices) {
|
||||||
// ANCHOR: register-payment-webook
|
// ANCHOR: register-payment-webook
|
||||||
sdk.registerWebhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>").await?
|
sdk.registerWebhook(webhookUrl: "https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>").await?
|
||||||
// ANCHOR_END: register-payment-webook
|
// ANCHOR_END: register-payment-webook
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user