From 8296742cce0b803fb6a2a2589aec9fe2a31180e3 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 30 Mar 2026 12:23:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=8C=E5=8F=8B=E9=A2=84=E4=B8=8B?= =?UTF-8?q?=E5=8D=95=E8=A1=A5=E5=85=85=E5=BF=85=E5=A1=AB=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=20txn=5Fbegin=5Fts=EF=BC=88=E4=BA=A4=E6=98=93=E8=B5=B7?= =?UTF-8?q?=E5=A7=8B=E6=97=B6=E9=97=B4=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/fuiou/types.go | 1 + pkg/fuiou/wxprecreate.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkg/fuiou/types.go b/pkg/fuiou/types.go index e5b458f..869212c 100644 --- a/pkg/fuiou/types.go +++ b/pkg/fuiou/types.go @@ -18,6 +18,7 @@ type WxPreCreateRequest struct { OrderAmt string `xml:"order_amt"` // 订单金额(分) GoodsDesc string `xml:"goods_des"` // 商品描述 TermIp string `xml:"term_ip"` // 终端IP + TxnBeginTs string `xml:"txn_begin_ts"` // 交易起始时间,格式 yyyyMMddHHmmss NotifyUrl string `xml:"notify_url"` // 回调地址 SubAppid string `xml:"sub_appid"` // 子应用ID(公众号/小程序AppID) SubOpenid string `xml:"sub_openid"` // 用户OpenID diff --git a/pkg/fuiou/wxprecreate.go b/pkg/fuiou/wxprecreate.go index e4e7037..4704525 100644 --- a/pkg/fuiou/wxprecreate.go +++ b/pkg/fuiou/wxprecreate.go @@ -2,6 +2,7 @@ package fuiou import ( "fmt" + "time" "go.uber.org/zap" ) @@ -22,6 +23,7 @@ func (c *Client) WxPreCreate(orderNo, amount, goodsDesc, termIP, tradeType, subA OrderAmt: amount, GoodsDesc: goodsDesc, TermIp: termIP, + TxnBeginTs: time.Now().Format("20060102150405"), NotifyUrl: c.NotifyURL, SubAppid: subAppid, SubOpenid: subOpenid,