diff --git a/lianlian/api.go b/lianlian/api.go index 3c67fbc..42017bf 100644 --- a/lianlian/api.go +++ b/lianlian/api.go @@ -23,6 +23,10 @@ var sysSecret = "WDgCblk9EOduT30aHVdeVg==" var Aeckey = "WDgCblk9EOduT30aHVdeVg==" var tbaseUrl = "https://uapid.lianlianlvyou.com/ll/api/" +//var channelId = "3270" +//var sysSecret = "Qqwsr0tozSaZXh4eRBagcg==" +//var Aeckey = "Qqwsr0tozSaZXh4eRBagcg==" +//var tbaseUrl = "https://uapi.lianlianlvyou.com/ll/api/" //获取渠道账户信息 func GetBalance() string { args := map[string]interface{}{ @@ -222,16 +226,17 @@ func OrderApplyRefund(params map[string]interface{}) string { return encryptedData } func CommEncryptedData(send string) string { + Aeckey1, _ := php2go.Base64Decode(Aeckey) encrptedStr := gjson.Get(send, "data.encryptedData").String() encrptedStr, _ = php2go.Base64Decode(encrptedStr) - encryptedData := AesDecryptECB([]byte(encrptedStr), []byte(Aeckey)) + encryptedData := AesDecryptECB([]byte(encrptedStr), []byte(Aeckey1)) fmt.Println(encryptedData) return encryptedData } func Send(method, params string) (string, error) { reqUrl := tbaseUrl + method + "?" - Aeckey, _ = php2go.Base64Decode(Aeckey) - encryptedData := AesEncryptECB([]byte(params), []byte(Aeckey)) + Aeckey1, _ := php2go.Base64Decode(Aeckey) + encryptedData := AesEncryptECB([]byte(params), []byte(Aeckey1)) nowTime := time.Now().Unix() * 1000 sysParams := map[string]interface{}{ "encryptedData": string(encryptedData),