refactored payment orchestration

This commit is contained in:
Stephan D
2026-02-03 00:40:46 +01:00
parent 05d998e0f7
commit 5e87e2f2f9
184 changed files with 3920 additions and 2219 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/tech/sendico/pkg/api/routers/gsresponse"
"github.com/tech/sendico/pkg/merrors"
pmodel "github.com/tech/sendico/pkg/model"
"github.com/tech/sendico/pkg/model/account_role"
"github.com/tech/sendico/pkg/mutil/mzap"
ledgerv1 "github.com/tech/sendico/pkg/proto/ledger/v1"
"go.mongodb.org/mongo-driver/v2/bson"
@@ -25,7 +26,7 @@ func (s *Service) postExternalCreditResponder(_ context.Context, req *ledgerv1.P
if req.OrganizationRef == "" {
return nil, merrors.InvalidArgument("organization_ref is required")
}
roleModel := pmodel.AccountRole("")
roleModel := account_role.AccountRole("")
if req.Role != ledgerv1.AccountRole_ACCOUNT_ROLE_UNSPECIFIED {
var err error
roleModel, err = protoAccountRoleToModel(req.Role)
@@ -258,7 +259,7 @@ func (s *Service) postExternalDebitResponder(_ context.Context, req *ledgerv1.Po
if req.OrganizationRef == "" {
return nil, merrors.InvalidArgument("organization_ref is required")
}
roleModel := pmodel.AccountRole("")
roleModel := account_role.AccountRole("")
if req.Role != ledgerv1.AccountRole_ACCOUNT_ROLE_UNSPECIFIED {
var err error
roleModel, err = protoAccountRoleToModel(req.Role)