/// <summary>
        /// return OnlineBatchReceiptResult object as a string
        /// </summary>
        /// <param name="code">the resultCodeType</param>
        /// <returns>object as string</returns>
        private string Response(resultCodeType code)
        {
            var receiptResult = new OnlineBatchReceiptResult
            {
                resultCode          = code,
                resultCodeSpecified = true,
                Value = ""
            };

            return(XmlUtils.SerializeXmlObjectToString(receiptResult));
        }
Ejemplo n.º 2
0
        private string Response(resultCodeType code)
        {
            var receiptResult = new OnlineBatchReceiptResult
            {
                resultCode          = code,
                resultCodeSpecified = true,
                Value = ""
            };

            var stringWriter = new StringWriter();
            var serializer   = new XmlSerializer(typeof(OnlineBatchReceiptResult));

            serializer.Serialize(stringWriter, receiptResult);
            return(stringWriter.ToString());
        }