/// <summary> /// [STATUS] – Status of bonus: //0 - Disable bonus, //1 - Select bonus, //2 - Take inventory bonus /// </summary> /// <param name="bonusID"></param> /// <param name="status"></param> /// <param name="login"></param> /// <param name="TID"></param> /// <param name="userIP"></param> /// <returns></returns> public async System.Threading.Tasks.Task <string> ApiBonusSelect(string bonusID, string status, string login, string TID, string userIP) { string strMdD5 = hashMD5.HashBonusSelect_BonusCancel(login, TID); using (var client = new HttpClient()) { client.BaseAddress = new Uri(URL_API_FUNDIST); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json"); HttpResponseMessage response = (await client.PostAsync("System/Api/" + API_KEY + "/WLCInfo/Bonus/Select?&IDBonus=" + bonusID + "&Status=" + status + "&Login="******"&TID=" + TID + "&Hash=" + strMdD5 + "&UserIP=" + userIP, null)); if (response.IsSuccessStatusCode) { return(response.Content.ReadAsStringAsync().Result); } return(null); } }