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:
@@ -8,7 +8,7 @@ public class ServiceStatusSnippets
|
||||
try
|
||||
{
|
||||
var healthCheck = sdk.ServiceHealthCheck();
|
||||
Console.WriteLine($"Current service status is: {healthCheck.status}");
|
||||
Console.WriteLine($"Current service status is: {healthCheck.status}");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
32
snippets/csharp/Webhook.cs
Normal file
32
snippets/csharp/Webhook.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Breez.Sdk;
|
||||
|
||||
public class ServiceStatusSnippets
|
||||
{
|
||||
public void Webhook(BlockingBreezServices sdk)
|
||||
{
|
||||
// ANCHOR: register-webook
|
||||
try
|
||||
{
|
||||
sdk.RegisterWebhook("https://yourapplication.com");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: register-webook
|
||||
}
|
||||
|
||||
public void PaymentWebhook(BlockingBreezServices sdk)
|
||||
{
|
||||
// ANCHOR: register-payment-webook
|
||||
try
|
||||
{
|
||||
sdk.RegisterWebhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Handle error
|
||||
}
|
||||
// ANCHOR_END: register-payment-webook
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user