diff --git a/app/controllers/events/public_registrations_controller.rb b/app/controllers/events/public_registrations_controller.rb index 6bc6c141a..4de1e462d 100644 --- a/app/controllers/events/public_registrations_controller.rb +++ b/app/controllers/events/public_registrations_controller.rb @@ -69,7 +69,7 @@ def create checkout_session = create_stripe_checkout_session(registration, result.form_submission) redirect_to checkout_session.url, allow_other_host: true, status: :see_other else - redirect_to registration_ticket_path(registration.slug), + redirect_to registration_ticket_path(registration.slug, registered: true), notice: "You have been successfully registered!" end else diff --git a/app/controllers/events/registrations_controller.rb b/app/controllers/events/registrations_controller.rb index 1d62daecf..23019e064 100644 --- a/app/controllers/events/registrations_controller.rb +++ b/app/controllers/events/registrations_controller.rb @@ -20,6 +20,8 @@ def show when "cancelled" flash.now[:alert] = "Payment was cancelled. You are registered for this event but payment may still be due." end + + @just_registered = params[:registered].present? || params[:checkout] == "success" end def invoice diff --git a/app/views/events/registrations/show.html.erb b/app/views/events/registrations/show.html.erb index 54f5ebf1c..404fb37a1 100644 --- a/app/views/events/registrations/show.html.erb +++ b/app/views/events/registrations/show.html.erb @@ -10,4 +10,15 @@ <% end %> +<% if @just_registered %> +
You're registered!
+A confirmation has been emailed to you. Your ticket is below — save this page for your records.
+