Example #1
0
        public ActionResult ConfirmTransfer(TransferModel paymentInfo, FormCollection collcetion)
        {
            if (paymentInfo.CardId == 0)
            {
                return(RedirectToAction("Transfer"));
            }
            if (paymentInfo.ToOwnPayments)
            {
                OwnPaymentsModule.AddTransferOwnPayment(paymentInfo, rep, WebSecurity.CurrentUserId);
            }
            TransferTransaction tt = new TransferTransaction();

            tt.Amount              = paymentInfo.Amount;
            tt.CardAccountID       = paymentInfo.CardId;
            tt.CustomerID          = WebSecurity.CurrentUserId;
            tt.Date                = Time.GetTime();
            tt.TargetCardAccountID = paymentInfo.TargetCardAccountId;
            tt.Number              = paymentInfo.Message;
            tt.Type                = PaymentType.Transfer;
            bool success = service.CreateTransferTransaction(tt);

            if (success)
            {
                return(View("Message", (object)"Вы перевели средства"));
            }
            else
            {
                return(View("Message", (object)"Что то пошло не так. Попробуйте еще раз"));
            }
        }