Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
6c298a5b1e
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      lianlian/api.go

+ 8
- 3
lianlian/api.go View File

@@ -23,6 +23,10 @@ var sysSecret = "WDgCblk9EOduT30aHVdeVg=="
var Aeckey = "WDgCblk9EOduT30aHVdeVg==" var Aeckey = "WDgCblk9EOduT30aHVdeVg=="
var tbaseUrl = "https://uapid.lianlianlvyou.com/ll/api/" 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 { func GetBalance() string {
args := map[string]interface{}{ args := map[string]interface{}{
@@ -222,16 +226,17 @@ func OrderApplyRefund(params map[string]interface{}) string {
return encryptedData return encryptedData
} }
func CommEncryptedData(send string) string { func CommEncryptedData(send string) string {
Aeckey1, _ := php2go.Base64Decode(Aeckey)
encrptedStr := gjson.Get(send, "data.encryptedData").String() encrptedStr := gjson.Get(send, "data.encryptedData").String()
encrptedStr, _ = php2go.Base64Decode(encrptedStr) encrptedStr, _ = php2go.Base64Decode(encrptedStr)
encryptedData := AesDecryptECB([]byte(encrptedStr), []byte(Aeckey))
encryptedData := AesDecryptECB([]byte(encrptedStr), []byte(Aeckey1))
fmt.Println(encryptedData) fmt.Println(encryptedData)
return encryptedData return encryptedData
} }
func Send(method, params string) (string, error) { func Send(method, params string) (string, error) {
reqUrl := tbaseUrl + method + "?" 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 nowTime := time.Now().Unix() * 1000
sysParams := map[string]interface{}{ sysParams := map[string]interface{}{
"encryptedData": string(encryptedData), "encryptedData": string(encryptedData),


Loading…
Cancel
Save