Пример #1
0
		protected static Transaction ParseFailureTransaction(XContainer xml)
		{
			Transaction transaction = new Transaction()
			{
            	Id				   = xml.Element(FailureTransactionIdNodeName).Value.Trim(),
            	OrderId			   = xml.Element(FailureOrderIdNodeName).Value.Trim(),
            	Description        = xml.Element(ResponseDescriptionNodeName).Value.Trim(),
			};
			
			return transaction;
		}
Пример #2
0
		protected static Transaction ParseSuccessTransaction(XContainer xml)
		{
			Transaction transaction = new Transaction()
			{
            	Id				   = xml.Element(TransactionIdNodeName).Value.Trim(),
            	OrderId			   = xml.Element(OrderIdNodeName).Value.Trim(),
            	Description        = xml.Element(DescriptionNodeName).Value.Trim(),
				Amount             = double.Parse(xml.Element(AmountNodeName).Value.Trim(), CultureInfo.InvariantCulture),
            	Currency           = xml.Element(CurrencyNodeName).Value.Trim(),
            	From               = xml.Element(FromNodeName).Value.Trim(),
            	To                 = xml.Element(ToNodeName).Value.Trim(),
            	RefererAddress     = xml.Element(ReferrerUrlNodeName).Value.Trim()
			};
			
			return transaction;
		}