瀏覽代碼

澳門國際銀行支付

tags/v1.5.5
jiaoboxiang 2 年之前
父節點
當前提交
0d6d068bd6
共有 1 個檔案被更改,包括 7 行新增0 行删除
  1. +7
    -0
      lib/luso_bank/macao_luso.go

+ 7
- 0
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


Loading…
取消
儲存