mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 22:04:21 +01:00
37 lines
900 B
C#
37 lines
900 B
C#
using Breez.Sdk;
|
|
|
|
public class WebhooksSnippets
|
|
{
|
|
public void HealthCheckStatus(BlockingBreezServices sdk)
|
|
{
|
|
// ANCHOR: health-check-status
|
|
try
|
|
{
|
|
var healthCheck = sdk.ServiceHealthCheck();
|
|
Console.WriteLine($"Current service status is: {healthCheck.status}");
|
|
}
|
|
catch (Exception)
|
|
{
|
|
// Handle error
|
|
}
|
|
// ANCHOR_END: health-check-status
|
|
}
|
|
|
|
public void ReportPaymentFailure(BlockingBreezServices sdk)
|
|
{
|
|
// ANCHOR: report-payment-failure
|
|
var paymentHash = "...";
|
|
try
|
|
{
|
|
sdk.ReportIssue(new ReportIssueRequest.PaymentFailure(
|
|
new ReportPaymentFailureDetails(paymentHash)
|
|
));
|
|
}
|
|
catch (Exception)
|
|
{
|
|
// Handle error
|
|
}
|
|
// ANCHOR_END: report-payment-failure
|
|
}
|
|
}
|