feat(payouts): implement promoter earnings viewing, request flow, and admin Stripe processing with webhooks
Add model methods for accurate net calculations (€0.50 + 1.5% fees), eligibility, refund handling Update promoter/payouts controller for index (pending events), create (eligibility checks) Integrate admin processing via Stripe::Transfer, webhook for status sync Enhance views: index pending cards, events/show preview/form Add comprehensive tests (models, controllers, service, integration); run migrations
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class AddIndexToPayoutsOnEventIdAndStatus < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_index :payouts, [ :event_id, :status ]
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddIndexToEarningsOnStatus < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_index :earnings, :status
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddIndexToTicketsOnStatusAndOrderId < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_index :tickets, [ :status, :order_id ]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user