diff --git a/src/main/java/site/goldenticket/domain/payment/service/PaymentService.java b/src/main/java/site/goldenticket/domain/payment/service/PaymentService.java index d6f0a347..c57f563b 100644 --- a/src/main/java/site/goldenticket/domain/payment/service/PaymentService.java +++ b/src/main/java/site/goldenticket/domain/payment/service/PaymentService.java @@ -2,6 +2,7 @@ import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import site.goldenticket.common.constants.OrderStatus; import site.goldenticket.common.exception.CustomException; @@ -200,6 +201,7 @@ public Optional findByProductIdAndStatus(Long productId, OrderStatus orde return orderRepository.findByProductIdAndStatus(productId, orderStatus); } + @Transactional(propagation = Propagation.REQUIRES_NEW) public void cancelPayment(String impUid) { List paymentCancelDetails = iamportRepository.cancelPaymentByImpUid(impUid); paymentCancelDetailRepository.saveAll(paymentCancelDetails);