From bb526a248d608a63f7960dd3bdfa94dd14eb37c4 Mon Sep 17 00:00:00 2001 From: yurii Date: Thu, 13 Nov 2025 16:06:31 +0000 Subject: [PATCH] improved logging for creditcall payment processing --- main.go | 2 +- payment/creditcall.go | 8 ++++---- release notes.md | 7 +++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/main.go b/main.go index 4cb3771..c4a45a0 100644 --- a/main.go +++ b/main.go @@ -23,7 +23,7 @@ import ( ) const ( - buildVersion = "1.0.22" + buildVersion = "1.0.24" serviceName = "hardlink" ) diff --git a/payment/creditcall.go b/payment/creditcall.go index c0f3089..faf53c0 100644 --- a/payment/creditcall.go +++ b/payment/creditcall.go @@ -297,11 +297,11 @@ func buildSuccessURL(result map[string]string) string { func BuildFailureURL(msgType, description string) string { q := url.Values{} - if msgType == "" { - msgType = ResultError + if msgType != "" { + description = fmt.Sprintf("Transaction %s", strings.ToLower(msgType)) } - if description == "" { - description = "Transaction failed" + if description != "" { + msgType = ResultError } log.WithFields(log.Fields{LogFieldError: msgType, LogFieldDescription: description}). diff --git a/release notes.md b/release notes.md index 507f8de..061fb04 100644 --- a/release notes.md +++ b/release notes.md @@ -2,10 +2,13 @@ builtVersion is a const in main.go -#### 1.0.23 - 20 October 2025 +#### 1.0.24 - 13 November 2025 +improved logging for creditcall payment processing + +#### 1.0.23 - 13 November 2025 moved handlers from main.go to handlers/handlers.go -#### 1.0.22 - 20 October 2025 +#### 1.0.22 - 13 November 2025 added test mode into config file to allow testing without connecting to the dispenser #### 1.0.21 - 20 October 2025