This post has been imported from my previous blog. I did my best to parse XML properly, but it might have some errors.
If you find one, send a Pull Request.
We’re on our journey to move from event sourcing oriented on the aggregates to a more functional approach. In the first entry, we went through some of the DDD building blocks. In the second, we defined an interface of the aggregate that we’ll work with. Before, going to the event sourced approached, let’s go through the aggregate’s implementation, somehow related to the Blue Book approach, without event sourcing.
Let’s dive straight into the code
We can see that a payment is issued for a user, with a specified payment method and a given amount of money. Yes, it’s simplistic, but bear with me, and follow its implementation for a while.
The other method is responsible for receiving the gateway response and applying it onto the aggregate. The status and the description are updated accordingly.
So far so good? In the next entry we’ll make this aggregate event sourced!
There's a mistake in the line containing the IF statement :) I'm pretty sure, that's not the operator you intended to use.
by Maciek Misztal at 2017-02-07 23:28:21 +0000