This commit is contained in:
邹宗楠
2025-04-29 14:42:24 +08:00
parent 9da5d239c6
commit c248d8e1d1
5 changed files with 41 additions and 8 deletions

View File

@@ -153,6 +153,30 @@ type AddTermReq struct {
Sign string `json:"sign"`
}
// TLQueryTerm 采集门店终端设备信息查询
func (a *API) TLQueryTerm(param *AddTermQuery) error {
onlineReq := utils.Struct2Map(param, "", false)
result, err := a.AccessAPI2("https://vsp.allinpay.com/cusapi/merchantapi/qryterm", onlineReq)
if err != nil {
return err
}
if result["retcode"].(string) != "SUCCESS" {
return fmt.Errorf(result["retmsg"].(string))
}
return nil
}
type AddTermQuery struct {
Orgid string `json:"orgid"` // 集团/代理商商户号 是 共享集团号/代理商参数时必填
Cusid string `json:"cusid"` // 商户号实际交易的商户号 否
Appid string `json:"appid"` // 应用ID平台分配的APPID 否
Version string `json:"version"` // 版本号接口版本号 可
Termno string `json:"termno"` // 8位数字,商户下唯一 否
Signtype string `json:"signtype"`
Sign string `json:"sign"`
Querytype string `json:"querytype"`
}
func (a *API) AccessAPI2(action string, bizParams map[string]interface{}) (retVal map[string]interface{}, err error) {
params := make(map[string]interface{})
params["appid"] = a.appID