public Payment eventListener(Payment ev)
        {
            Console.WriteLine("Payment received; processing .....");

            // set the status on the event and write it back into the space
            ev.Status=ETransactionStatus.PROCESSED;
            return ev;
        }
Example #2
0
        public void postPayment()
        {
            // Create a payment
            Payment payment = new Payment();
            payment.CreatedDate=new DateTime();
            payment.MerchantId=1L;
            payment.PaymentAmount=120.70;
            payment.Status=ETransactionStatus.NEW;

            Console.WriteLine(payment.Status);

            // write the payment into the space
            proxy.Write(payment);

            Thread.Sleep(10000);

            SqlQuery<Payment> query = new SqlQuery<Payment>("MerchantId=1");
            payment = proxy.Read<Payment>(query);

            Assert.AreEqual(payment.Status, ETransactionStatus.PROCESSED);

            Console.WriteLine(payment.Status);
        }
 Payment unprocessedData()
 {
     Payment template = new Payment();
     template.Status=ETransactionStatus.NEW;
     return template;
 }