Esempio n. 1
0
        public IActionResult PromotePost(int id)
        {
            var adv = unit.AdvertismentRepository.GetAdvertisement(id);

            adManager.MakePayment(adv);
            unit.SaveData();
            if (adv.IsPromoted == true)
            {
                return(RedirectToAction("Success", "Customers"));
            }
            else
            {
                throw new Exception("Płatność Nie powiodła się");
            }
        }