feat: Implement payment retry system and draft ticket expiry management
- Add 30-minute expiry window for draft tickets with automatic cleanup - Implement 3-attempt payment retry mechanism with tracking - Create background job for cleaning expired draft tickets every 10 minutes - Add comprehensive UI warnings for expiring tickets and retry attempts - Enhance dashboard to display pending draft tickets with retry options - Add payment cancellation handling with smart retry redirections - Include rake tasks for manual cleanup and statistics - Add database fields: expires_at, payment_attempts, last_payment_attempt_at, stripe_session_id - Fix payment attempt counter display to show correct attempt number (1/3, 2/3, 3/3)
This commit is contained in:
@@ -29,6 +29,11 @@ class PagesController < ApplicationController
|
||||
.distinct
|
||||
.limit(5)
|
||||
|
||||
# Draft tickets that can be retried
|
||||
@draft_tickets = current_user.tickets.includes(:ticket_type, :event)
|
||||
.can_retry_payment
|
||||
.order(:expires_at)
|
||||
|
||||
# Events sections
|
||||
@today_events = Event.published.where("DATE(start_time) = ?", Date.current).order(start_time: :asc)
|
||||
@tomorrow_events = Event.published.where("DATE(start_time) = ?", Date.current + 1).order(start_time: :asc)
|
||||
|
||||
Reference in New Issue
Block a user