Stage 1: Problem
Problem
You are building an order processing service. When an order is placed, it must:
- Charge the customer via a payment gateway
- Send a confirmation email
- Update inventory in the warehouse system
Each of these depends on an external service. Your OrderService creates these dependencies internally.
How would you structure this so you can test the order logic without hitting real payment APIs, sending real emails, or modifying real inventory?
Write your approach before continuing.