|
|
@@ -6,6 +6,7 @@ import ( |
|
|
|
"crypto/hmac" |
|
|
|
"crypto/sha256" |
|
|
|
"encoding/hex" |
|
|
|
"fmt" |
|
|
|
"github.com/syyongx/php2go" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
@@ -20,7 +21,7 @@ func Send(appkey, appSecret, method string, params map[string]interface{}, accto |
|
|
|
"app_key": appkey, |
|
|
|
"method": method, |
|
|
|
"param_json": paramJson, |
|
|
|
"timestamp": zhios_third_party_utils.Int64ToStr(time.Now().Unix()), |
|
|
|
"timestamp": time.Now().Format("2006-01-02 15:04:05"), |
|
|
|
"v": "2", |
|
|
|
} |
|
|
|
sign := GetSign(appSecret, param) |
|
|
@@ -36,6 +37,8 @@ func Send(appkey, appSecret, method string, params map[string]interface{}, accto |
|
|
|
url += "?" + k + "=" + php2go.URLEncode(v) |
|
|
|
} |
|
|
|
} |
|
|
|
fmt.Println(url) |
|
|
|
fmt.Println(paramJson) |
|
|
|
data, err := zhios_third_party_utils.CurlPost(url, paramJson, nil) |
|
|
|
return string(data), err |
|
|
|
} |
|
|
|