Browse Source

澳門國際銀行支付

tags/v1.5.5
jiaoboxiang 2 years ago
parent
commit
0d6d068bd6
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      lib/luso_bank/macao_luso.go

+ 7
- 0
lib/luso_bank/macao_luso.go View File

@@ -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


Loading…
Cancel
Save