feat: configure webhook

This commit is contained in:
2023-07-19 21:20:59 +02:00
parent e80e75cb8c
commit 44e9315706
7 changed files with 65 additions and 9 deletions

View File

@@ -108,6 +108,15 @@ func (s *RestServer) onNotification(ctx context.Context, notifChan chan domain.N
continue
}
// notify
if s.config.WebhookUrl != "" {
go func() {
if err := s.orderSrv.Webhook(ctx, s.config.WebhookUrl, order); err != nil {
log.Println("orderSrv.Webhook:", err)
}
}()
}
// Send email to client and provider
if err := s.mailSrv.SendProviderConfirm(mail.SendOK{
Tx: order.Tx,