- 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
25 lines
894 B
Ruby
25 lines
894 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
# Test script to verify Stripe concern methods in actual controller context
|
|
puts "Testing Stripe concern methods in controller context..."
|
|
|
|
# Create a mock request and response
|
|
request = ActionDispatch::TestRequest.create
|
|
response = ActionDispatch::TestResponse.create
|
|
|
|
# Create an instance of EventsController
|
|
controller = EventsController.new
|
|
controller.request = request
|
|
controller.response = response
|
|
|
|
puts "Controller instance created successfully"
|
|
puts "stripe_configured? method available: #{controller.respond_to?(:stripe_configured?)}"
|
|
puts "initialize_stripe method available: #{controller.respond_to?(:initialize_stripe)}"
|
|
|
|
if controller.respond_to?(:stripe_configured?)
|
|
puts "stripe_configured? result: #{controller.stripe_configured?}"
|
|
end
|
|
|
|
if controller.respond_to?(:initialize_stripe?)
|
|
puts "initialize_stripe result: #{controller.initialize_stripe}"
|
|
end |