|
|
@@ -9,11 +9,15 @@ import ( |
|
|
|
func ZeroBuyUrl(appSecret string, param map[string]string) string { |
|
|
|
url := "http://h5.hlpay178.cn/#/" |
|
|
|
param["deviceID"] = strings.ReplaceAll(param["deviceID"], " ", "") |
|
|
|
deviceID, _ := php2go.URLDecode(param["deviceID"]) |
|
|
|
if deviceID != "" { |
|
|
|
param["deviceID"] = deviceID |
|
|
|
} |
|
|
|
for k, v := range param { |
|
|
|
if strings.Contains(url, "?") == false { |
|
|
|
url += "?" + k + "=" + v |
|
|
|
url += "?" + k + "=" + php2go.URLEncode(v) |
|
|
|
} else { |
|
|
|
url += "&" + k + "=" + v |
|
|
|
url += "&" + k + "=" + php2go.URLEncode(v) |
|
|
|
} |
|
|
|
} |
|
|
|
sign := GetSign(appSecret, param) |
|
|
|