feat(hardlink): unify kiosk payments and finalize legacy cleanup

This commit is contained in:
2026-11-04 17:43:10 +00:00
parent 568adc034b
commit 814d87768d
57 changed files with 3624 additions and 1762 deletions
+4 -5
View File
@@ -1,7 +1,6 @@
package creditcall
import (
"strings"
"testing"
"gitea.futuresens.co.uk/futuresens/hardlink/internal/types"
@@ -23,12 +22,12 @@ func TestPreauthLegacyDecision(t *testing.T) {
} {
t.Run(tc.name, func(t *testing.T) {
fields := map[string]string{types.TransactionResult: tc.result, types.TransactionType: tc.kind, types.Errors: "provider detail"}
redirect, save := BuildPreauthRedirectURL(fields)
if strings.HasPrefix(redirect, "/successful?") != tc.approved || save != tc.save {
t.Errorf("BuildPreauthRedirectURL(%v) = %q,%t, want approved=%t save=%t", fields, redirect, save, tc.approved, tc.save)
approved, save := PreauthDecision(fields)
if approved != tc.approved || save != tc.save {
t.Errorf("PreauthDecision(%v) = %t,%t, want approved=%t save=%t", fields, approved, save, tc.approved, tc.save)
}
if _, ok := fields[types.TotalAmount]; ok {
t.Error("BuildPreauthRedirectURL fabricated TOTAL_AMOUNT")
t.Error("PreauthDecision fabricated TOTAL_AMOUNT")
}
})
}