Пример #1
0
        public ActionResult ConfirmArbitrary(ArbitraryPaymentModel paymentInfo, FormCollection collcetion)
        {
            if (paymentInfo.AccountCardId == 0)
            {
                return(RedirectToAction("Arbitrary"));
            }
            if (paymentInfo.ToOwnPayments)
            {
                OwnPaymentsModule.AddArbitraryOwnPayment(paymentInfo, rep, WebSecurity.CurrentUserId);
            }
            ArbitraryTransaction tr = new ArbitraryTransaction();

            tr.Amount           = paymentInfo.Amount;
            tr.BankCode         = paymentInfo.BankName;
            tr.CardAccountID    = paymentInfo.AccountCardId;
            tr.CustomerID       = WebSecurity.CurrentUserId;
            tr.Recipient        = paymentInfo.Recipient;
            tr.RecipientAccount = paymentInfo.RecipientAccount;
            tr.Target           = paymentInfo.Target;
            tr.UNP = paymentInfo.UNP;
            bool success = service.CreateArbitraryTransaction(tr);

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