TG settlement service

This commit is contained in:
Stephan D
2026-01-02 14:54:18 +01:00
parent ea1c69f14a
commit 743f683d92
82 changed files with 4693 additions and 503 deletions

View File

@@ -0,0 +1,24 @@
package storage
import (
"context"
"errors"
"github.com/tech/sendico/gateway/tgsettle/storage/model"
)
var ErrDuplicate = errors.New("payment gateway storage: duplicate record")
type Repository interface {
Payments() PaymentsStore
TelegramConfirmations() TelegramConfirmationsStore
}
type PaymentsStore interface {
FindByIdempotencyKey(ctx context.Context, key string) (*model.PaymentExecution, error)
InsertExecution(ctx context.Context, exec *model.PaymentExecution) error
}
type TelegramConfirmationsStore interface {
Upsert(ctx context.Context, record *model.TelegramConfirmation) error
}