better logging + fixed tg messaging

This commit is contained in:
Stephan D
2026-02-03 15:19:06 +01:00
parent b7ce4f7f4a
commit 446d4d737c
7 changed files with 38 additions and 20 deletions

View File

@@ -82,6 +82,10 @@ func (p *Payments) Upsert(ctx context.Context, record *model.PaymentRecord) erro
record.QuoteRef = strings.TrimSpace(record.QuoteRef)
record.OutgoingLeg = strings.TrimSpace(record.OutgoingLeg)
record.TargetChatID = strings.TrimSpace(record.TargetChatID)
record.IntentRef = strings.TrimSpace(record.IntentRef)
if record.PaymentIntentID == "" {
return merrors.InvalidArgument("intention reference is required", "payment_intent_ref")
}
if record.IdempotencyKey == "" {
return merrors.InvalidArgument("idempotency key is required", "idempotency_key")
}