From 0d6d068bd666c637814d2519a962d6e0fa1b4ffe Mon Sep 17 00:00:00 2001 From: jiaoboxiang Date: Wed, 9 Nov 2022 11:19:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=BE=B3=E9=96=80=E5=9C=8B=E9=9A=9B=E9=8A=80?= =?UTF-8?q?=E8=A1=8C=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/luso_bank/macao_luso.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/luso_bank/macao_luso.go b/lib/luso_bank/macao_luso.go index feede4a..24e2e5a 100644 --- a/lib/luso_bank/macao_luso.go +++ b/lib/luso_bank/macao_luso.go @@ -27,6 +27,8 @@ type DataParam struct { ReqTime string `json:"reqTime" explain:"请求时间戳(yyyyMMddHHmmss)"` MsgId string `json:"msgId" explain:"请求消息唯一编号"` Attach string `json:"attach" explain:"附加数据(附加数据,用于在同步应答或异步通知时原样返回)"` + CertId string `json:"certId" explain:"数字证书 ID(默认 01)"` + Version string `json:"version" explain:"版本号(默认 1.0.0)"` } `json:"head"` ReqBody map[string]string `json:"reqBody"` } @@ -41,6 +43,11 @@ func (payParam *PayParam) SetData(dataParam DataParam) *signParam { randomInt := rand.Intn(100) dataParam.Head.MsgId = zhios_pay_utils.AnyToString(randomInt) + dataParam.Head.MchtNo + now.Format("20060102150405") dataParam.Head.ReqTime = now.Format("20060102150405") + dataParam.Head.CertId = "01" + dataParam.Head.Version = "1.0.0" + if dataParam.ReqBody["mchtOrderId"] != "" { + dataParam.Head.MsgId = dataParam.ReqBody["mchtOrderId"] + now.Format("20060102150405") + } payParam.Data = zhios_pay_utils.SerializeStr(dataParam) var signs signParam signs.PayParam = payParam