feat(v2): order 补 biz_code + webhook payload 带 product_biz_code(收口 P2 延后项)
This commit is contained in:
@@ -72,7 +72,7 @@ type OrderResult struct {
|
||||
// account, persists a pending Order + Attempt (P1 OrderStore), and returns the
|
||||
// payment session {render_type, payload}. 加渠道不改 client(设计 §4.2)。
|
||||
func (g *Gateway) CreateOrder(ctx context.Context, in CreateOrderInput) (*OrderResult, error) {
|
||||
amountMinor, currency, subject, _, err := g.products.Resolve(in.SKU)
|
||||
amountMinor, currency, subject, bizCode, err := g.products.Resolve(in.SKU)
|
||||
if err != nil {
|
||||
return nil, err // ErrProductNotFound
|
||||
}
|
||||
@@ -93,7 +93,7 @@ func (g *Gateway) CreateOrder(ctx context.Context, in CreateOrderInput) (*OrderR
|
||||
|
||||
if err := g.orders.CreateOrder(&model.OrderV2{
|
||||
OutTradeNo: outNo, BizSystem: in.BizSystem, BizRef: in.BizRef,
|
||||
Subject: subject, AmountMinor: amountMinor, Currency: currency,
|
||||
BizCode: bizCode, Subject: subject, AmountMinor: amountMinor, Currency: currency,
|
||||
Status: model.OrderPendingV2,
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user