Distributed Transaction, Saga Pattern, Axon Framework, Spring Boot, Microservices.
payment.setUserId(event.getUserId()); payment.setComment("Payment Successful"); repository.save(payment); } }catch(Exception e) { event.setPaymentStatus("ERROR"); event.setComment("Payment gateway error"); } } public void onCancelPaymentEvent(CancelPaymentEvent event) { Payment payment =