Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handles Nomod webhook events
func NewHandler ¶
func NewHandler( client nomod.NomodClient, paymentSvc *nomod.PaymentService, invoiceSyncSvc *nomod.InvoiceSyncService, entityIntegrationMappingRepo entityintegrationmapping.Repository, logger *logger.Logger, ) *Handler
NewHandler creates a new Nomod webhook handler
func (*Handler) HandleWebhookEvent ¶
func (h *Handler) HandleWebhookEvent(ctx context.Context, payload *NomodWebhookPayload, services *ServiceDependencies) error
HandleWebhookEvent processes a Nomod webhook event This function never returns errors to ensure webhooks always return 200 OK All errors are logged internally to prevent Nomod from retrying
type NomodWebhookPayload ¶
type NomodWebhookPayload struct {
ID string `json:"id"` // Charge ID (required)
InvoiceID *string `json:"invoice_id,omitempty"` // Present if invoice payment
PaymentLinkID *string `json:"payment_link_id,omitempty"` // Present if payment link payment
}
NomodWebhookPayload represents incoming webhook from Nomod
type ServiceDependencies ¶
type ServiceDependencies = interfaces.ServiceDependencies
ServiceDependencies contains all service dependencies needed by webhook handlers
Click to show internal directories.
Click to hide internal directories.