优化订单支付

This commit is contained in:
yml
2026-06-08 23:56:25 +08:00
parent 870ea72996
commit a2a0489158
20 changed files with 884 additions and 5 deletions
@@ -77,6 +77,16 @@ func TestParsePayloadNormalizesAliases(t *testing.T) {
}
}
func TestNormalizeRefundStatusTreatsSuccessCodeAsRefunded(t *testing.T) {
status := normalizeRefundStatus(map[string]string{
"code": "BBS00000",
"msg": "成功",
})
if status != "refunded" {
t.Fatalf("normalizeRefundStatus() = %q, want refunded", status)
}
}
func TestCreatePaymentOmitsCounterParamWhenPayModeBlank(t *testing.T) {
body := captureCreatePaymentBody(t, "")
reqData := body["req_data"].(map[string]any)