/// <summary> /// create a Umarket Login Session /// </summary> /// <returns></returns> public static string CreatAndLoginSession() { #region Config string init = ConfigurationManager.AppSettings["init"].ToString(); string salt = ConfigurationManager.AppSettings["salt"].ToString(); string pin = ConfigurationManager.AppSettings["pin"].ToString(); #endregion // Get string response = SoapServices.SendXMLRequest(GetXMLCommands.GetSessionXML()); var t = XElement.Parse(response); string session = t.Value.Remove(t.Value.Length - 8); pin = GeneralService.GetPin(session, salt, pin); response = GetXMLCommands.GetLoginXML(init, pin, session); response = SoapServices.SendXMLRequest(response); t = XElement.Parse(response); string transactionId = t.Value.Remove(t.Value.Length - 8); return(session); }
public static string getAgentDetails(string subNumber) { string response = string.Empty; string session = GeneralService.CreatAndLoginSession(); return(response = SoapServices.SendXMLRequest(GetXMLCommands.GetAgentStatusXML(subNumber, session))); }