TG settlement service
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package notifications
|
||||
|
||||
import (
|
||||
messaging "github.com/tech/sendico/pkg/messaging/envelope"
|
||||
cinternal "github.com/tech/sendico/pkg/messaging/internal/notifications/confirmations"
|
||||
ch "github.com/tech/sendico/pkg/messaging/notifications/confirmations/handler"
|
||||
np "github.com/tech/sendico/pkg/messaging/notifications/processor"
|
||||
"github.com/tech/sendico/pkg/mlogger"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
)
|
||||
|
||||
func ConfirmationRequest(sender string, request *model.ConfirmationRequest) messaging.Envelope {
|
||||
return cinternal.NewConfirmationRequestEnvelope(sender, request)
|
||||
}
|
||||
|
||||
func ConfirmationResult(sender string, result *model.ConfirmationResult, sourceService, rail string) messaging.Envelope {
|
||||
return cinternal.NewConfirmationResultEnvelope(sender, result, sourceService, rail)
|
||||
}
|
||||
|
||||
func NewConfirmationRequestProcessor(logger mlogger.Logger, handler ch.ConfirmationRequestHandler) np.EnvelopeProcessor {
|
||||
return cinternal.NewConfirmationRequestProcessor(logger, handler)
|
||||
}
|
||||
|
||||
func NewConfirmationResultProcessor(logger mlogger.Logger, sourceService, rail string, handler ch.ConfirmationResultHandler) np.EnvelopeProcessor {
|
||||
return cinternal.NewConfirmationResultProcessor(logger, sourceService, rail, handler)
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package notifications
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
)
|
||||
|
||||
type ConfirmationRequestHandler = func(context.Context, *model.ConfirmationRequest) error
|
||||
|
||||
type ConfirmationResultHandler = func(context.Context, *model.ConfirmationResult) error
|
||||
@@ -0,0 +1,11 @@
|
||||
package notifications
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
)
|
||||
|
||||
type PaymentGatewayIntentHandler = func(context.Context, *model.PaymentGatewayIntent) error
|
||||
|
||||
type PaymentGatewayExecutionHandler = func(context.Context, *model.PaymentGatewayExecution) error
|
||||
@@ -0,0 +1,26 @@
|
||||
package notifications
|
||||
|
||||
import (
|
||||
messaging "github.com/tech/sendico/pkg/messaging/envelope"
|
||||
pinternal "github.com/tech/sendico/pkg/messaging/internal/notifications/paymentgateway"
|
||||
ch "github.com/tech/sendico/pkg/messaging/notifications/paymentgateway/handler"
|
||||
np "github.com/tech/sendico/pkg/messaging/notifications/processor"
|
||||
"github.com/tech/sendico/pkg/mlogger"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
)
|
||||
|
||||
func PaymentGatewayIntent(sender string, intent *model.PaymentGatewayIntent) messaging.Envelope {
|
||||
return pinternal.NewPaymentGatewayIntentEnvelope(sender, intent)
|
||||
}
|
||||
|
||||
func PaymentGatewayExecution(sender string, exec *model.PaymentGatewayExecution) messaging.Envelope {
|
||||
return pinternal.NewPaymentGatewayExecutionEnvelope(sender, exec)
|
||||
}
|
||||
|
||||
func NewPaymentGatewayIntentProcessor(logger mlogger.Logger, handler ch.PaymentGatewayIntentHandler) np.EnvelopeProcessor {
|
||||
return pinternal.NewPaymentGatewayIntentProcessor(logger, handler)
|
||||
}
|
||||
|
||||
func NewPaymentGatewayExecutionProcessor(logger mlogger.Logger, handler ch.PaymentGatewayExecutionHandler) np.EnvelopeProcessor {
|
||||
return pinternal.NewPaymentGatewayExecutionProcessor(logger, handler)
|
||||
}
|
||||
Reference in New Issue
Block a user