feat: configure webhook
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user