...
Receive a list of account payments
Create and save a new NordeaPayoutSource object
For each account payment in the list:
Validate the account payment (chekcing the payment option and trying to match the personalID (cpr-nr) to a PersonalID object)
Create and save a new NordeaPayoutItem object, with an account payment and source object
Update the capture status of the account payment to AccountPaymentCaptureStatus.PAYOUT_SENT
Add the account payment amount to the batch sum
If account payment validation fails, no NordeaPayoutItem is created, and the account payment capture status is set to AccountPaymentCaptureStatus.PAYOUT_REJECTED
When all account payments have been processed:
Set the final batch size on the source object
Set the batch sum on the source object
Set the status id of the source object to 1 (READY)
Save the source object
...
New MessageHandlerEngine that processes nordea Nordea payout source objects. The engine will retrieve source objects in status 1 (READY) and generate a payment xml file and update the source with send date, set source status to 2 (SENT) and set the newly generated file name.
...