commit fde725d3fe4544bc200c652e2088465c848a129b
parent 88d635fdf3db1ed13ed03cc72b987bd9a5530d49
Author: Joel-Haeberli <haebu@rubigen.ch>
Date: Mon, 3 Jun 2024 20:39:07 +0200
fix: enhance logging
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/c2ec/proc-transfer.go b/c2ec/proc-transfer.go
@@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
+ "strings"
"time"
)
@@ -166,7 +167,7 @@ func executePendingTransfers(errs chan error, lastlog time.Time) {
}
LogInfo("proc-transfer", "refunding transaction "+tid)
- err = client.Refund(tid)
+ err = client.Refund(strings.Trim(tid, " \n"))
if err != nil {
LogWarn("proc-transfer", "refunding using provider client failed")
LogError("proc-transfer-4", err)
diff --git a/c2ec/wallee-client.go b/c2ec/wallee-client.go
@@ -173,6 +173,7 @@ func (w *WalleeClient) Refund(transactionId string) error {
WALLEE_API_SPACEID_PARAM_NAME: strconv.Itoa(w.credentials.SpaceId),
}
url := FormatUrl(call, map[string]string{}, queryParams)
+ LogInfo("wallee-client", "refund url "+url)
hdrs, err := prepareWalleeHeaders(url, HTTP_POST, w.credentials.UserId, w.credentials.ApplicationUserKey)
if err != nil {