-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
taskTasks and work itemsTasks and work items
Description
Currently this event handler has multiple functions that are being performed:
- Calculate any required non merchant fee and add to the transaction aggregate (ServiceProviderFeeAddedToTransactionEvent)
- Calculate any requried merchant fees and add these to the Settlement Aggregate (MerchantFeeAddedPendingSettlementEvent)
- If the merchant is an immediate settlement merchant then the fee is marked as settled on the transaction aggregate (MerchantFeeAddedToTransactionEvent) and in the settlement aggregate (MerchantFeeSettledEvent)
This processing up until now has served well however 2 other operations need to be thrown into the mix.
- Determining and recording the cost price and margin for a transaction for the estate to report on
- Decrementing the float balance for the contract product sold with the transaction.
This would mean a 3rd aggregate being maintained in this event handler and further processing being done on the transaction aggregate as well as a further remote call to get information from the float aggregate.
This whole flow needs to be redesigned/refactored to simplify the flow and also more robust/not so many moving parts.
Metadata
Metadata
Assignees
Labels
taskTasks and work itemsTasks and work items