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:
7
db/schema.rb
generated
Executable file → Normal file
7
db/schema.rb
generated
Executable file → Normal file
@@ -40,7 +40,6 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
||||
t.integer "quantity"
|
||||
t.datetime "sale_start_at"
|
||||
t.datetime "sale_end_at"
|
||||
t.boolean "requires_id"
|
||||
t.integer "minimum_age"
|
||||
t.bigint "event_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
@@ -53,9 +52,13 @@ ActiveRecord::Schema[8.0].define(version: 2025_08_23_171354) do
|
||||
create_table "tickets", charset: "utf8mb4", collation: "utf8mb4_uca1400_ai_ci", force: :cascade do |t|
|
||||
t.string "qr_code"
|
||||
t.integer "price_cents"
|
||||
t.string "status", default: "active"
|
||||
t.string "status", default: "draft"
|
||||
t.string "first_name"
|
||||
t.string "last_name"
|
||||
t.string "stripe_session_id"
|
||||
t.timestamp "expires_at"
|
||||
t.integer "payment_attempts", default: 0
|
||||
t.timestamp "last_payment_attempt_at"
|
||||
t.bigint "user_id"
|
||||
t.bigint "ticket_type_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
|
||||
Reference in New Issue
Block a user