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