feat(v2): order 补 biz_code + webhook payload 带 product_biz_code(收口 P2 延后项)

This commit is contained in:
wangjia
2026-07-10 14:12:44 +08:00
parent c06f6d3a3c
commit 7a27a6223a
5 changed files with 53 additions and 11 deletions
+17
View File
@@ -81,6 +81,23 @@ func TestCreateOrderPipeline(t *testing.T) {
}
}
func TestCreateOrderPersistsBizCode(t *testing.T) {
g, _, _, orders := newGateway(t)
res, err := g.CreateOrder(context.Background(), gateway.CreateOrderInput{
SKU: "pro_year", Method: "fake", BizSystem: "pangolin", BizRef: "u-1",
})
if err != nil {
t.Fatalf("create: %v", err)
}
o, err := orders.GetOrder(res.OrderNo)
if err != nil {
t.Fatalf("get order: %v", err)
}
if o.BizCode != "pro_year" { // stubResolver 的 bizCode
t.Fatalf("order.BizCode = %q, want pro_year", o.BizCode)
}
}
func TestCreateOrderErrors(t *testing.T) {
g, _, _, _ := newGateway(t)
ctx := context.Background()