Ejemplo n.º 1
0
        public ActionResult New(long id)
        {
            var viewmodel = new tradelr.Models.payment.Payment {
                orderID = id
            };
            var order = repository.GetOrder(id);

            if (order == null)
            {
                Syslog.Write("Unable to find order:" + id);
                return(Json("Invalid ID".ToJsonFail(), JsonRequestBehavior.AllowGet));
            }

            viewmodel.paymentMethods.Initialise(MASTERdomain, true);

            var totalAmount = order.total;
            var currency    = order.currency.ToCurrency();

            viewmodel.invoiceAmount = totalAmount.ToString("n" + currency.decimalCount);
            viewmodel.totalUnpaid   = (totalAmount - order.totalPaid).ToString("n" + currency.decimalCount);
            viewmodel.currencyCode  = currency.code;
            viewmodel.orderType     = order.type.ToEnum <TransactionType>();

            return(View(viewmodel));
        }
Ejemplo n.º 2
0
        public ActionResult Method(long id)
        {
            var viewmodel = new tradelr.Models.payment.Payment();

            viewmodel.paymentMethods.Initialise(MASTERdomain, false);
            viewmodel.orderID = id;

            return(View(viewmodel));
        }