fix yushan
This commit is contained in:
@@ -191,7 +191,7 @@ westdex:
|
||||
# 🌍 羽山配置
|
||||
# ===========================================
|
||||
yushan:
|
||||
url: https://api.yushanshuju.com/credit-gw/service"
|
||||
url: https://api.yushanshuju.com/credit-gw/service
|
||||
api_key: "4c566c4a4b543164535455685655316c"
|
||||
acct_id: "YSSJ843926726"
|
||||
|
||||
|
||||
@@ -103,11 +103,15 @@ func (y *YushanService) CallAPI(code string, params map[string]interface{}) (res
|
||||
|
||||
var respData []byte
|
||||
|
||||
sDec, err := base64.StdEncoding.DecodeString(string(body))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: %s", ErrSystem, err.Error())
|
||||
if IsJSON(string(body)) {
|
||||
respData = body
|
||||
} else {
|
||||
sDec, err := base64.StdEncoding.DecodeString(string(body))
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: %s", ErrSystem, err.Error())
|
||||
}
|
||||
respData = y.AES_CBC_Decrypt(sDec, key)
|
||||
}
|
||||
respData = y.AES_CBC_Decrypt(sDec, key)
|
||||
retCode := gjson.GetBytes(respData, "retcode").String()
|
||||
|
||||
if retCode == "100000" {
|
||||
|
||||
Reference in New Issue
Block a user