优化结构

This commit is contained in:
Yvan
2026-08-20 21:46:52 +08:00
parent 23bc29ce0f
commit 63dbb4cfbc
78 changed files with 767 additions and 1082 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ import (
"testing"
"kra/internal/biz"
"kra/pkg/paymentkit"
"kra/internal/utils/paymentutil"
"github.com/go-pay/gopay"
gopayQQ "github.com/go-pay/gopay/qq"
@@ -55,7 +55,7 @@ func TestQQCreateKeepsClientPaymentDataOutOfDurableIdentities(t *testing.T) {
http.Error(w, "invalid XML", http.StatusBadRequest)
return
}
values, err := paymentkit.XMLValues(body)
values, err := paymentutil.XMLValues(body)
if err != nil {
t.Errorf("parse request XML: %v", err)
http.Error(w, "invalid XML", http.StatusBadRequest)
@@ -81,7 +81,7 @@ func TestQQCreateKeepsClientPaymentDataOutOfDurableIdentities(t *testing.T) {
for key, value := range response {
encoded[key] = fmt.Sprint(value)
}
_, _ = w.Write(paymentkit.XMLEncode(encoded))
_, _ = w.Write(paymentutil.XMLEncode(encoded))
}))
result, err := (&qqAdapter{}).Create(context.Background(), &biz.PaymentRequest{