payment quotation v2 + payment orchestration v2 draft

This commit is contained in:
Stephan D
2026-02-24 13:01:35 +01:00
parent 0646f55189
commit 6444813f38
289 changed files with 17005 additions and 16065 deletions

View File

@@ -6,21 +6,8 @@ import (
"github.com/tech/sendico/payments/quotation/internal/service/plan"
"github.com/tech/sendico/payments/storage/model"
"github.com/tech/sendico/pkg/mlogger"
sharedv1 "github.com/tech/sendico/pkg/proto/payments/shared/v1"
)
type defaultPlanBuilder struct {
inner plan.Builder
}
func newDefaultPlanBuilder(logger mlogger.Logger) PlanBuilder {
return &defaultPlanBuilder{inner: plan.NewDefaultBuilder(logger)}
}
func (b *defaultPlanBuilder) Build(ctx context.Context, payment *model.Payment, quote *sharedv1.PaymentQuote, routes RouteStore, templates PlanTemplateStore, gateways GatewayRegistry) (*model.PaymentPlan, error) {
return b.inner.Build(ctx, payment, quote, routes, templates, gateways)
}
func railFromEndpoint(endpoint model.PaymentEndpoint, attrs map[string]string, isSource bool) (model.Rail, string, error) {
return plan.RailFromEndpoint(endpoint, attrs, isSource)
}
@@ -29,6 +16,13 @@ func resolveRouteNetwork(attrs map[string]string, sourceNetwork, destNetwork str
return plan.ResolveRouteNetwork(attrs, sourceNetwork, destNetwork)
}
func selectPlanTemplate(ctx context.Context, logger mlogger.Logger, templates PlanTemplateStore, sourceRail, destRail model.Rail, network string) (*model.PaymentPlanTemplate, error) {
func selectPlanTemplate(
ctx context.Context,
logger mlogger.Logger,
templates plan.PlanTemplateStore,
sourceRail model.Rail,
destRail model.Rail,
network string,
) (*model.PaymentPlanTemplate, error) {
return plan.SelectTemplate(ctx, logger, templates, sourceRail, destRail, network)
}