Distributed Transaction, Saga Pattern, Axon Framework, Spring Boot, Microservices.
repository.findByPaymentId(event.getPaymentId()); if(payment==null) { payment = new Payment(); payment.setOrderId(event.getOrderId()); payment.setPaymentId(event.getPaymentId()); payment.setPaymentStatus(event.getPaymentStatus()); payment.setPrice(event.getPrice());