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