refactor(pricing): implement hybrid fee model (€0.50 + 1.5%) deducted from promoter payout

- Remove 1€ fixed fee from orders and Stripe invoices
- Add platform_fee_cents, promoter_payout_cents methods to Order model
- Update views to show clean ticket totals without added fees
- Update tests for new fee calculation logic
- Update pricing docs with implemented model
This commit is contained in:
kbe
2025-09-15 20:07:51 +02:00
parent d6184b6c84
commit 049e5505ef
9 changed files with 205 additions and 108 deletions

View File

@@ -293,18 +293,7 @@ class OrdersController < ApplicationController
}
end
# Add service fee as a separate line item
line_items << {
price_data: {
currency: "eur",
product_data: {
name: "Frais de service",
description: "Frais de traitement de la commande"
},
unit_amount: 100 # 1€ in cents
},
quantity: 1
}
# No service fee added to customer; deducted from promoter payout
Stripe::Checkout::Session.create(
payment_method_types: [ "card" ],