- Create new TicketsController with actions for name collection, creation, and checkout - Add dedicated ticket views (new.html.erb, checkout.html.erb, show.html.erb) - Update ticket_selection_controller.js to handle form submission via AJAX - Add store_cart endpoint in EventsController for session-based cart management - Update routes to support new ticket flow: /tickets/new, /create, /checkout - Fix attribute name consistency across views (title→name, starts_at→start_time) - Add Stripe checkout integration with proper error handling - Remove deprecated collect_names flow in favor of streamlined approach The flow is now: Event selection → AJAX cart storage → Name collection → Checkout → Payment
21 lines
624 B
Ruby
Executable File
21 lines
624 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
# Create a mock controller to test the StripeConcern
|
|
class TestController
|
|
include StripeConcern
|
|
|
|
def self.name
|
|
"TestController"
|
|
end
|
|
end
|
|
|
|
# Test the StripeConcern methods
|
|
controller = TestController.new
|
|
|
|
puts "Testing StripeConcern..."
|
|
puts "stripe_configured? method exists: #{controller.respond_to?(:stripe_configured?)}"
|
|
puts "stripe_configured? result: #{controller.stripe_configured?}"
|
|
|
|
# Check the Rails configuration directly
|
|
puts "Rails.application.config.stripe: #{Rails.application.config.stripe}"
|
|
puts "Secret key present?: #{Rails.application.config.stripe[:secret_key].present?}" |