fee treatment added

This commit is contained in:
Stephan D
2026-02-24 16:39:08 +01:00
parent 2fe90347a8
commit 2e08ec9b9b
17 changed files with 162 additions and 30 deletions

View File

@@ -8,11 +8,10 @@ import (
"github.com/tech/sendico/payments/storage/model"
"github.com/tech/sendico/pkg/db/storable"
pm "github.com/tech/sendico/pkg/model"
"github.com/tech/sendico/pkg/mservice"
"go.mongodb.org/mongo-driver/v2/bson"
)
const paymentsV2Collection = "payments_v2"
type paymentDocument struct {
storable.Base `bson:",inline"`
pm.OrganizationBoundBase `bson:",inline"`
@@ -28,7 +27,7 @@ type paymentDocument struct {
}
func (*paymentDocument) Collection() string {
return paymentsV2Collection
return mservice.Payments
}
func toDocument(payment *agg.Payment) (*paymentDocument, error) {

View File

@@ -9,6 +9,7 @@ import (
"github.com/tech/sendico/payments/orchestrator/internal/service/orchestrationv2/psvc"
"github.com/tech/sendico/payments/storage"
"github.com/tech/sendico/pkg/mlogger"
"github.com/tech/sendico/pkg/mservice"
orchestrationv2 "github.com/tech/sendico/pkg/proto/payments/orchestration/v2"
"go.mongodb.org/mongo-driver/v2/mongo"
"go.uber.org/zap"
@@ -81,7 +82,7 @@ func buildPaymentRepositoryV2(repo storage.Repository, logger mlogger.Logger) pr
return nil
}
paymentRepo, err := prepo.NewMongo(
db.Collection("payments_v2"),
db.Collection(mservice.Payments),
prepo.Dependencies{Logger: logger.Named("orchestration_v2_prepo")},
)
if err != nil {