public bool HandleOrder(Transaction transaction, ColonyCommerceContext commerceContext)
        {
            var checkout = _checkoutService.GetReadOnlyCheckoutFromXml(transaction.CheckOutXml);

            if (checkout == null)
            {
                return(false);
            }
            var basketViewModel = _basketViewModelBuilder.GetBasketViewModel(checkout.Basket, commerceContext);

            return(true);
        }
        //
        // GET: /Email/Email/
        public ActionResult Index(int id = 628817)
        {
            ColonyCommerceContext CommerceContext = new ColonyCommerceContext();

            var transaction = _transactionService.GetById(id);

            var checkout = _checkoutService.GetReadOnlyCheckoutFromXml(transaction.CheckOutXml);

            if (checkout == null)
            {
                return(HttpNotFound("Could not load order detail for the specified transaction id"));
            }


            BasketViewModel basketViewModel = _basketViewModelBuilder.GetBasketViewModel(checkout.Basket, CommerceContext, checkout);

            var orderDetailViewModel = new OrderDetailViewModel
            {
                Basket            = basketViewModel,
                Person            = _mappingEngine.Map <PersonViewModel>(_personService.GetById(checkout.Person.Id)),
                DeliveryAddress   = _mappingEngine.Map <AddressViewModel>(checkout.GetAddress(AddressType.Delivery)),
                BillingAddress    = _mappingEngine.Map <AddressViewModel>(checkout.GetAddress(AddressType.Billing)),
                OrderDate         = transaction.LastModified,
                OrderNumber       = transaction.OrderNumber,
                TransactionStatus = transaction.TransactionStatus
            };

            var viewModel = new EmailReceiptViewModel
            {
                Order = orderDetailViewModel,
                Site  = CommerceContext.ColonyContext.CurrentSite
            };

            SendEmailReceipt(orderDetailViewModel);

            return(View("~/Areas/Email/Views/Email/OrderConfirmation.cshtml", viewModel));
        }