better logging + fixed tg messaging
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user