I'm trying to understand how clean architecture works, last project i had a user, he can add a payment card and buy a subscription (example use case), but when it's new user, add and buy integrated as one step
According to what has been read, it should have two "Interactors", one "AddPayment" and "Purchase", , but... how can I mix: The user can do both separately, but when he is new, in registration process he adds the payment method and makes the charge in one step,
I think I should have an "Add and pay" use case, but it would have repeated code and a broken paradigm, I see these options:
- Make a third use case with repeated code
- Merge from controller
- Make a use case that calls the other two
How have you solved it?