优化结构

This commit is contained in:
Yvan
2026-08-28 00:29:40 +08:00
parent 04ff85116c
commit 03a4131f6e
118 changed files with 758 additions and 834 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ import (
"net/http/httptest"
"testing"
"kra/pkg/paymentkit"
"kra/internal/paymentkit"
"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 := paymentutil.XMLValues(body)
values, err := paymentkit.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(paymentutil.XMLEncode(encoded))
_, _ = w.Write(paymentkit.XMLEncode(encoded))
}))
result, err := (&qqAdapter{}).Create(context.Background(), &bizpayment.PaymentRequest{