feat: improve member payment and order flows

This commit is contained in:
richjohnrambo
2026-10-15 15:03:39 +08:00
parent 06eaf748ed
commit acf50b9b7c
11 changed files with 172 additions and 22 deletions
+2
View File
@@ -103,11 +103,13 @@ func TestQuoteFailsClosed(t *testing.T) {
func TestNormalizePaymentAccount(t *testing.T) {
input := PaymentAccountInput{BankName: "中国工商银行", HolderName: "张三",
IdentityNo: "11010119900101123X", AccountNo: "6222 0000-0000 1234",
DigitalRMBCode: "1234 5678",
WechatQRAttachmentID: 8, AlipayQRAttachmentID: 9}
if err := normalizePaymentAccount(&input); err != nil {
t.Fatal(err)
}
if input.IdentityNo != "11010119900101123X" || input.AccountNo != "6222000000001234" ||
input.DigitalRMBCode != "12345678" ||
maskAccount(input.AccountNo) != "6222********1234" || maskIdentityNo(input.IdentityNo) != "1101**********123X" {
t.Fatalf("unexpected normalized input: %#v", input)
}