saveinmed/backend/internal/http/handler
Tiago Yamamoto 12e2503244 feat: implement invisible 12% buyer fee
Business model:
- Seller registers R$10,00 → Seller sees R$10,00 → Seller receives R$10,00
- Buyer searches → sees R$11,20 (+12%) → pays R$11,20
- Marketplace keeps R$1,20 (12%)

Changes:
- config.go: Add BuyerFeeRate (default 0.12)
- handler.go: Add buyerFeeRate field to Handler struct
- product_handler.go: SearchProducts inflates prices for buyers
- server.go: Pass cfg.BuyerFeeRate to handler.New()
- handler_test.go: Fix 3 New() calls with fee rate

Env var: BUYER_FEE_RATE (default: 0.12)
2025-12-26 23:23:18 -03:00
..
cart_handler.go refactor(handler): extract order and cart handlers 2025-12-20 08:06:07 -03:00
company_handler.go feat: tenant model, seeder, and product search with distance 2025-12-20 09:03:13 -03:00
dashboard_handler.go refactor(handler): complete package decomposition - 92% extracted 2025-12-20 08:10:56 -03:00
dto.go feat: Implement Payment Methods, Shipping Improvements, Swagger Audit, and UUIDv7 Migration 2025-12-26 17:48:50 -03:00
handler.go feat: implement invisible 12% buyer fee 2025-12-26 23:23:18 -03:00
handler_test.go feat: implement invisible 12% buyer fee 2025-12-26 23:23:18 -03:00
marketplace_handler.go Add full auth endpoints and swagger updates 2025-12-21 22:37:54 -03:00
order_handler.go debug: add detailed logging with emojis for orders endpoint 2025-12-26 22:44:34 -03:00
payment_handler.go refactor(handler): complete package decomposition - 92% extracted 2025-12-20 08:10:56 -03:00
product_handler.go feat: implement invisible 12% buyer fee 2025-12-26 23:23:18 -03:00
review_handler.go feat: add quantity selector, fix offer display, swap filter/location layout 2025-12-26 22:16:48 -03:00
shipping_handler.go fix: allow buyers to view shipping settings and filter orders by role 2025-12-26 22:35:27 -03:00
user_handler.go fix: filter users by company for ALL non-Admin roles 2025-12-26 22:37:23 -03:00