小程序一些功能更新
This commit is contained in:
@@ -274,6 +274,9 @@ type XPayDeliverNotify struct {
|
||||
ProductId string `xml:"ProductId"`
|
||||
Quantity int `xml:"Quantity"`
|
||||
} `xml:"GoodsInfo"`
|
||||
// Attach 透传数据(下单时 BuildSignData 里带的 attach 原样回传)。
|
||||
// ⚠️ 仅作日志/交叉校验,**永不作为发货依据**(约定 S4:发货只读本地订单行)。
|
||||
Attach string `xml:"Attach"`
|
||||
}
|
||||
|
||||
// ParseDeliverNotify 解析发货推送 XML
|
||||
@@ -288,6 +291,11 @@ func ParseDeliverNotify(raw []byte) (*XPayDeliverNotify, error) {
|
||||
if notify.OutTradeNo == "" {
|
||||
return nil, gerror.New("发货推送缺少 OutTradeNo")
|
||||
}
|
||||
// Attach 仅作日志/交叉校验,**永不作为发货依据**(约定 S4:发货只读本地订单行)。
|
||||
// 注意:平台推送在部分场景不携带 Attach,缺失不影响发货。
|
||||
g.Log().Infof(context.Background(),
|
||||
"[xpay] 发货推送 attach=%s outTradeNo=%s productId=%s",
|
||||
notify.Attach, notify.OutTradeNo, notify.GoodsInfo.ProductId)
|
||||
return notify, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user