极客开通失败
This commit is contained in:
@@ -182,6 +182,7 @@ namespace Hncore.Pass.Vpn.Service
|
||||
LogHelper.Info(title, map.ToJson());
|
||||
try
|
||||
{
|
||||
|
||||
var resp = await client.GetAsync(this.UserApiUrl + "?" + this.FormatRequest(map));
|
||||
var content = await resp.Content.ReadAsStringAsync();
|
||||
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||
@@ -198,28 +199,8 @@ namespace Hncore.Pass.Vpn.Service
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.GetInfo();
|
||||
try
|
||||
{
|
||||
var resp = await client.GetAsync(this.UserApiUrl + "?" + this.FormatRequest(map));
|
||||
var content = await resp.Content.ReadAsStringAsync();
|
||||
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||
var status = jo["code"].ToString();
|
||||
if (status == "1")
|
||||
{
|
||||
return new ApiResult(ResultCode.C_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.Error(title, content);
|
||||
return new ApiResult(ResultCode.C_INVALID_ERROR, "开户失败");
|
||||
}
|
||||
}
|
||||
catch (Exception exs)
|
||||
{
|
||||
LogHelper.Error(title, exs.GetInfo());
|
||||
return new ApiResult(ResultCode.C_INVALID_ERROR, "开户失败");
|
||||
}
|
||||
LogHelper.Error(title, ex.GetInfo());
|
||||
return new ApiResult(ResultCode.C_INVALID_ERROR, "开户失败");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -349,27 +330,7 @@ namespace Hncore.Pass.Vpn.Service
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelper.Error(title, ex.Message);
|
||||
try
|
||||
{
|
||||
var resp = await client.GetAsync(this.UserApiUrl + "?" + this.FormatRequest(map));
|
||||
var content = await resp.Content.ReadAsStringAsync();
|
||||
JObject jo = (JObject)JsonConvert.DeserializeObject(content);
|
||||
var status = jo["code"].ToString();
|
||||
if (status == "1")
|
||||
{
|
||||
return new ApiResult(ResultCode.C_SUCCESS);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogHelper.Error(title, content);
|
||||
return new ApiResult(ResultCode.C_INVALID_ERROR, "续费失败");
|
||||
}
|
||||
}
|
||||
catch (Exception exs)
|
||||
{
|
||||
LogHelper.Error(title, exs.Message);
|
||||
return new ApiResult(ResultCode.C_INVALID_ERROR, "续费失败");
|
||||
}
|
||||
return new ApiResult(ResultCode.C_INVALID_ERROR, "续费失败");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user