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

@@ -295,7 +295,7 @@ func (p *paymentExecutor) executeSendStep(
}
logger.Info("Sending provider settlement transfer",
zap.String("idempotency", req.IdempotencyKey),
zap.String("idempotency", req.IdempotencyKey), zap.String("intent_ref", req.IntentRef),
)
result, err := gw.Send(ctx, req)

View File

@@ -31,6 +31,10 @@ func (p *paymentExecutor) buildProviderSettlementTransferRequest(payment *model.
if requestID == "" {
return rail.TransferRequest{}, merrors.InvalidArgument("provider settlement: idempotency key is required")
}
intentRef := strings.TrimSpace(payment.Intent.Ref)
if intentRef == "" {
return rail.TransferRequest{}, merrors.InvalidArgument("provider settlement: intention ref is required")
}
paymentRef := strings.TrimSpace(payment.PaymentRef)
if paymentRef == "" {
return rail.TransferRequest{}, merrors.InvalidArgument("provider settlement: payment_ref is required")
@@ -88,7 +92,7 @@ func (p *paymentExecutor) buildProviderSettlementTransferRequest(payment *model.
Metadata: metadata,
PaymentRef: paymentRef,
OperationRef: operationRef,
IntentRef: payment.Intent.Ref,
IntentRef: intentRef,
}
if fromRole != nil {
req.FromRole = *fromRole