- 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 - 24
 - 25
 - 26
 - 27
 - 28
 - 29
 - 30
 
                        public void Check()
{
	try
	{
		this.Function = "check";
		this.Params = HttpUtility.UrlEncode((this.Params), Encoding.GetEncoding(1251));
		if ((this.Function.Length > 0) &&
			(this.PaymExtId.Length > 0) &&
			(this.PaymSubjTp.ToString().Length > 0) &&
			(this.Amount.ToString().Length > 0) &&
			(this.Params.Length > 0) &&
			(this.TermType.Length > 0) &&
			(this.TermId.Length > 0) &&
			(this.FeeSum.ToString().Length > 0))
		{
			this.Request = string.Format("function={0}&PaymExtId={1}&PaymSubjTp={2}&Amount={3}&Params={4}&TermType={5}&TermID={6}&FeeSum={7}",
										 this.Function, this.PaymExtId, this.PaymSubjTp.ToString(), this.Amount.ToString(), this.Params, this.TermType, this.TermId, this.FeeSum.ToString());
			SendRequest();
		}
		else
		{
			GetError("-1");
		}                
	}
	catch
	{
		GetError("-9");
	}
}
                                 
        
            Оттуда же. Тип полей PaymSubjTp, Amount, FeeSum - int, всех остальных - string.
Amount.ToString().Length > 0 и т.п. всегда true, а вот ноль или отрицательное значение спокойно пропустят. 
Интересно, разработчики хоть знают, что функции умеют принимать и возвращать данные? :)
        
        
Комментарии (0) RSS
Добавить комментарий