feat(v2): order 补 biz_code + webhook payload 带 product_biz_code(收口 P2 延后项)
This commit is contained in:
@@ -82,14 +82,15 @@ func (g *Gateway) enqueuePaymentSucceeded(att *model.Attempt, paidAt time.Time)
|
||||
return nil // 独立收款无业务方回调;或已翻转/已取消
|
||||
}
|
||||
data := map[string]any{
|
||||
"event_type": "payment.succeeded",
|
||||
"out_trade_no": o.OutTradeNo,
|
||||
"biz_system": o.BizSystem,
|
||||
"biz_ref": o.BizRef,
|
||||
"amount_minor": o.AmountMinor,
|
||||
"currency": o.Currency,
|
||||
"channel": att.Channel,
|
||||
"paid_at": paidAt.Format(time.RFC3339),
|
||||
"event_type": "payment.succeeded",
|
||||
"out_trade_no": o.OutTradeNo,
|
||||
"biz_system": o.BizSystem,
|
||||
"biz_ref": o.BizRef,
|
||||
"product_biz_code": o.BizCode, // 设计 §5:业务方按套餐码映射权益(时长/档位),不硬编码 product_id
|
||||
"amount_minor": o.AmountMinor,
|
||||
"currency": o.Currency,
|
||||
"channel": att.Channel,
|
||||
"paid_at": paidAt.Format(time.RFC3339),
|
||||
}
|
||||
return g.webhook.Enqueue(o.OutTradeNo, o.BizSystem, "payment.succeeded", data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user