Exemple #1
0
        private void btnProcessPayment_Click(object sender, EventArgs e)
        {
            Order order = new Order
            {
                OrderDate = DateTime.Now,
                OrderID = Guid.NewGuid(),
                CustomerID = 5,
                Amount = 85.25M,
                CreditCard = "1111222233334444",
                Expiration = "5/15"
            };

            paymentReceipt = new PaymentReceiptProxy
            {
                Order = order
            };

            Receipt receipt = paymentReceipt.Receipt;
            DisplayReceipt(receipt);
        }
        private void btnProcessPayment_Click(object sender, EventArgs e)
        {
            Order order = new Order
            {
                OrderDate  = DateTime.Now,
                OrderID    = Guid.NewGuid(),
                CustomerID = 5,
                Amount     = 85.25M,
                CreditCard = "1111222233334444",
                Expiration = "5/15"
            };

            paymentReceipt = new PaymentReceiptProxy
            {
                Order = order
            };

            Receipt receipt = paymentReceipt.Receipt;

            DisplayReceipt(receipt);
        }
Exemple #3
0
 public PaymentReceiptController(IPaymentReceipt _paymentReceipt)
 {
     paymentReceipt = _paymentReceipt;
 }