Files
aperonight/.env.example
kbe c3f5d72a91 fix: Resolve QR code generation errors in checkout email notifications
This fixes the 'data must be a String, QRSegment, or an Array' error that was
preventing checkout completion.

Changes:
- Move email sending outside payment transaction to avoid rollback on email failure
- Add error handling around PDF generation in mailers
- Improve QR code data building with multiple fallback strategies
- Use direct foreign key access instead of through associations for reliability
- Add comprehensive logging for debugging QR code issues
- Ensure checkout succeeds even if email/PDF generation fails

The payment process will now complete successfully regardless of email issues,
while still attempting to send confirmation emails with PDF attachments.
2025-09-06 13:33:22 +02:00

42 lines
1.3 KiB
Plaintext
Executable File

# Application data
RAILS_ENV=production
SECRET_KEY_BASE=a3f5c6e7b8d9e0f1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7
DEVISE_SECRET_KEY=your_devise_secret_key_here
APP_NAME=Aperonight
# Database Configuration for production and development
# DB_HOST=127.0.0.1
# DB_PORT=3306
DB_ROOT_PASSWORD=root
DB_DATABASE=aperonight
DB_USERNAME=root
DB_PASSWORD=root
# Test database
DB_TEST_DATABASE=aperonight_test
DB_TEST_USERNAME=root
DB_TEST_USERNAME=root
# Mailer Configuration (for Devise and tests)
MAILER_DEFAULT_URL_OPTIONS=http://localhost:3000
# Test environment will use MailHog by default on 127.0.0.1:1025
SMTP_ADDRESS=127.0.0.1
SMTP_PORT=1025
# Optional auth (usually not required for MailHog)
# SMTP_USER_NAME=
# SMTP_PASSWORD=
# SMTP_DOMAIN=localhost
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS=false
# SMTP_STARTTLS=true
# Application variables
STRIPE_PUBLISHABLE_KEY=pk_test_51S1M7BJWx6G2LLIXYpTvi0hxMpZ4tZSxkmr2Wbp1dQ73MKNp4Tyu4xFJBqLXK5nn4E0nEf2tdgJqEwWZLosO3QGn00kMvjXWGW
STRIPE_SECRET_KEY=sk_test_51S1M7BJWx6G2LLIXK2pdLpRKb9Mgd3sZ30N4ueVjHepgxQKbWgMVJoa4v4ESzHQ6u6zJjO4jUvgLYPU1QLyAiFTN00sGz2ortW
STRIPE_WEBHOOK_SECRET=LaReunion974
# Scaleway login
OPENAI_API_KEY=f66dbb5f-9770-4f81-b2ea-eb7370bc9aa5
OPENAI_BASE_URL=https://api.scaleway.ai/v1
OPENAI_MODEL=devstral-small-2505