Distributed Transaction, Saga Pattern, Axon Framework, Spring Boot, Microservices.
repository.findByPaymentId(event.getPaymentId()); payment.setPaymentStatus(event.getPaymentStatus()); payment.setComment("Payment cancelled. Order error."); repository.save(payment); } } In this class we have hardcoded a condition to simulate a payment failure if the user id is RWE0003.