예제 #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"));
        }
예제 #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"));
        }