mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 13:54:20 +01:00
21
snippets/go/webhook.go
Normal file
21
snippets/go/webhook.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package example
|
||||
|
||||
import (
|
||||
"log"
|
||||
)
|
||||
|
||||
func Webhook() {
|
||||
// ANCHOR: register-webook
|
||||
if err := sdk.RegisterWebhook("https://yourapplication.com"); err != nil {
|
||||
log.Printf("Webhook registration failed: %v", err)
|
||||
}
|
||||
// ANCHOR_END: register-webook
|
||||
}
|
||||
|
||||
func PaymentWebhook() {
|
||||
// ANCHOR: register-payment-webook
|
||||
if err := sdk.RegisterWebhook("https://your-nds-service.com/notify?platform=ios&token=<PUSH_TOKEN>"); err != nil {
|
||||
log.Printf("Webhook registration failed: %v", err)
|
||||
}
|
||||
// ANCHOR_END: register-payment-webook
|
||||
}
|
||||
Reference in New Issue
Block a user