refactored orchestrator and callbacks service to use pkg messsaging + envelope factory / handler

This commit is contained in:
Stephan D
2026-02-28 20:56:26 +01:00
parent 363d6474f2
commit 12c67361dd
14 changed files with 316 additions and 311 deletions

View File

@@ -0,0 +1,9 @@
package notifications
import (
"context"
"github.com/tech/sendico/pkg/model"
)
type PaymentStatusUpdatedHandler = func(context.Context, *model.PaymentStatusUpdated) error

View File

@@ -0,0 +1,18 @@
package notifications
import (
messaging "github.com/tech/sendico/pkg/messaging/envelope"
pinternal "github.com/tech/sendico/pkg/messaging/internal/notifications/paymentorchestrator"
ch "github.com/tech/sendico/pkg/messaging/notifications/paymentorchestrator/handler"
np "github.com/tech/sendico/pkg/messaging/notifications/processor"
"github.com/tech/sendico/pkg/mlogger"
"github.com/tech/sendico/pkg/model"
)
func PaymentStatusUpdated(sender string, status *model.PaymentStatusUpdated) messaging.Envelope {
return pinternal.NewPaymentStatusUpdatedEnvelope(sender, status)
}
func NewPaymentStatusUpdatedProcessor(logger mlogger.Logger, handler ch.PaymentStatusUpdatedHandler) np.EnvelopeProcessor {
return pinternal.NewPaymentStatusUpdatedProcessor(logger, handler)
}