- Create a customer with balancetype BALANCE_PRE_PAID and a dynamicBalance of 0
- Create a creditcard payment with credit card number 4111111111111111 for this customer and make sure the PaymentFakeTask is configured
- This will create a failed payment
- Delete the failed payment
The DynamicBalanceManagerTask will act on the OrderDeletedEvent and will decrease the dynamicBalance for the user that placed the payment this user will now have a negative dynamicBalance.
This seems like very undesirable behaviour. Wouldn't it make sense to check the status of the payment and only deduct the amount from the dynamicbalance when the payment was previously succesful