Merge newer features and remove legacy code
This commit is contained in:
@@ -141,23 +141,6 @@ class Payout < ApplicationRecord
|
||||
)
|
||||
end
|
||||
|
||||
# Mark payout as manually processed (for countries where Stripe payouts are not available)
|
||||
def mark_as_manually_processed!
|
||||
return unless pending? || processing?
|
||||
|
||||
update!(
|
||||
status: :completed,
|
||||
stripe_payout_id: "MANUAL_#{SecureRandom.hex(10)}" # Generate a unique ID for manual payouts
|
||||
)
|
||||
|
||||
update_earnings_status
|
||||
end
|
||||
|
||||
# Check if this is a manual payout (not processed through Stripe)
|
||||
def manual_payout?
|
||||
stripe_payout_id.present? && stripe_payout_id.start_with?("MANUAL_")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def update_earnings_status
|
||||
|
||||
Reference in New Issue
Block a user