示例#1
0
        /// <summary>
        /// Process a PaymentItem Command
        /// Added to the RestCommand paramters are a noun and verb parameters
        /// These are the noun and verb used to call the PaymentItem command.
        /// </summary>
        /// <param name="command">command Paramters</param>
        /// <returns>XMLDocument containing PaymentItem result</returns>
        public XmlDocument ProcessPaymentItem(RESTCommand command)
        {
            XmlDocument response = new XmlDocument();

            PaymentCommand paymentCommand = CreatePaymentCommand(command.Parameters);

            HangoutCommandBase parser = new HangoutCommandBase("PaymentItemsService");

            response = parser.ProcessRequest(paymentCommand);

            return(response);
        }
示例#2
0
        public XmlDocument ProcessPaymentItemString(HangoutPostedFile paymentCommand)
        {
            XmlDocument response = new XmlDocument();

            byte[] buffer = new byte[paymentCommand.InputStream.Length];
            paymentCommand.InputStream.Read(buffer, 0, (int)paymentCommand.InputStream.Length);

            UTF8Encoding encoding             = new UTF8Encoding();
            String       paymentCommandString = encoding.GetString(buffer);

            ServiceCommandSerializer serializer = new ServiceCommandSerializer();
            PaymentCommand           command    = (PaymentCommand)serializer.DeserializeCommandData(paymentCommandString, typeof(PaymentCommand));

            HangoutCommandBase parser = new HangoutCommandBase("PaymentItemsService");

            response = parser.ProcessRequest(command);

            return(response);
        }