public static string SendManDocPack(string login, int password, int moneyType, string money, string center, string vType, string returnDate, bool reception = false, bool withoutApp = false) { string requestResult = String.Empty; string servicesList = ManualDocPack.AllServices(); Log.Add("запрос на чек: " + servicesList, freeLine: true); string fields = "login="******"&pass="******"&moneytype=" + moneyType.ToString() + "&money=" + money + "¢er=" + RCenterNamesExclusion(center) + "&vtype=" + vType + "&rdate=" + returnDate + "&services=" + servicesList + "&callback=" + MainWindow.Cashbox.serialNumber + "&r=" + (reception ? "1" : "0") + "&n=" + (withoutApp ? "1" : "0"); string request = fields + "&crc=" + CheckRequest.CreateMD5(fields, notOrd: true); string url = "/vcs/cashbox_mandocpack.htm?" + request; Log.Add(url, logType: "http"); try { requestResult = SockectSend(url); } catch (SocketException e) { Log.AddWeb("(отправка запроса на чек) " + e.Message); return("ERROR|Ошибка отправки запроса на чек"); } return(requestResult); }
public static string SendManDocPack(string login, int password, int moneyType, string money, string center, string vType, string returnDate, bool reception = false) { string requestResult = String.Empty; string servicesList = ManualDocPack.AllServices(); Log.Add("запрос на чек: " + servicesList, freeLine: true); string fields = String.Format( "login={0}&pass={1}&moneytype={2}&money={3}¢er={4}&vtype={5}&rdate={6}&services={7}&callback={8}&r={9}&n=1", login, password, moneyType, money, RCenterNamesExclusion(center), vType, returnDate, servicesList, MainWindow.Cashbox.serialNumber, (reception ? "1" : "0") ); string url = String.Format("/vcs/cashbox_mandocpack.htm?{0}&crc={1}", fields, CheckRequest.CreateMD5(fields, notOrd: true)); Log.Add(url, logType: "http"); try { requestResult = SockectSend(url); } catch (SocketException e) { Log.AddWeb("(отправка запроса на чек) " + e.Message); return("ERROR|Ошибка отправки запроса на чек"); } return(requestResult); }