Esempio n. 1
0
        public ActionResult PayPalSuccess(Payment payment, User currentUser)
        {
            Require.NotNull(payment, "payment");
            Require.IsTrue(() => payment.PaymentType == PaymentType.PayPal, "payment");

            PaymentService.AcceptPayment(payment, currentUser);

            return(RedirectToAction("AllMemberships", "UserGroup"));
        }
Esempio n. 2
0
        public ActionResult AcceptPayment(Payment payment, User currentUser)
        {
            Require.NotNull(payment, "payment");
            Require.NotNull(currentUser, "currentUser");

            if (!ModelState.IsValid)
            {
                return(View("AcceptPayment", payment));
            }

            PaymentService.AcceptPayment(payment, currentUser);
            return(RedirectToAction("Index"));
        }