refactored payment orchestration
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user