Merge newer features and remove legacy code

This commit is contained in:
kbe
2025-09-18 01:04:55 +02:00
parent a0640b5401
commit 355d4e45d7
12 changed files with 1450 additions and 200 deletions

View File

@@ -3,12 +3,6 @@ class PayoutService
@payout = payout
end
# Legacy method for backward compatibility - now redirects to manual workflow
def process!
Rails.logger.warn "PayoutService#process! called - manual processing required for payout #{@payout.id}"
raise "Automatic payout processing is disabled. Use manual workflow in admin interface."
end
# Check if user is in France or doesn't have a Stripe account (manual processing)
def process_with_stripe_or_manual
if should_process_manually?
@@ -64,7 +58,7 @@ class PayoutService
begin
# For manual processing, we just mark it as completed
# In a real implementation, this would trigger notifications to admin
@payout.mark_as_manually_processed!
@payout.mark_completed!(User.admin.first || User.first, "Manual processing completed")
Rails.logger.info "Manual payout processed for payout #{@payout.id} for event #{@payout.event.name}"
rescue => e