ljl 5 months ago
parent b3bf54d3a7
commit db7d3eea40

@ -25,5 +25,5 @@ zking:
app-secret: "" app-secret: ""
suixing: suixing:
base-url: "https://test-open.zking.com" base-url: "https://test-open.zking.com"
app-id: "" app-id: "2024060132098212"
app-secret: "" app-secret: "N1xsd0sPxoWxUYb6"

@ -37,12 +37,12 @@ func (api *suixingApi) CreateOrderCallback(param CommonParam) (*Result, error) {
func (api *suixingApi) Sign(param *CommonParam) error { func (api *suixingApi) Sign(param *CommonParam) error {
//vals, err := utils.StructToURLValues(param) //vals, err := utils.StructToURLValues(param)
vals := url.Values{} vals := url.Values{}
vals.Set("appid", param.AppID) vals.Set("appid", global.Config.Suixing.AppID)
vals.Set("requestid", param.RequestID) vals.Set("requestid", param.RequestID)
vals.Set("timestamp", param.Timestamp) vals.Set("timestamp", param.Timestamp)
vals.Set("version", param.Version) vals.Set("version", param.Version)
vals.Set("data", utils.Md5(param.Data)) vals.Set("data", utils.Md5(param.Data))
vals.Set("appsecret", "aaaaaa") vals.Set("appsecret", global.Config.Suixing.AppSecret)
fmt.Println(vals.Encode()) fmt.Println(vals.Encode())
param.Sign = utils.Sha1(vals.Encode()) param.Sign = utils.Sha1(vals.Encode())
return nil return nil

Loading…
Cancel
Save