Ejemplo n.º 1
0
        /// <summary>
        /// the function is used when the user accept money from sender
        /// </summary>
        /// <param name="id">gets the id from the listed transers</param>
        /// <returns></returns>
        public ActionResult Accept(int id)
        {
            var senderUsername = Session["username"].ToString();

            if (Banking.ReceieveTransfer(senderUsername, id))
            {
                TempData["Msg"] = "😎 Money deposited to your account shortly...";
                return(RedirectToAction("Main"));
            }
            TempData["Msg"] = "😢 Sorry transaction failed";
            return(RedirectToAction("Main"));
        }