コード例 #1
0
        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;
        }
コード例 #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);
        }
コード例 #3
0
 Payment unprocessedData()
 {
     Payment template = new Payment();
     template.Status=ETransactionStatus.NEW;
     return template;
 }