Skip to content

Commit

Permalink
Merge pull request #218 from Yanol-Market/feature/12
Browse files Browse the repository at this point in the history
feat: 결제 취소시 db에 취소 내역 저장
  • Loading branch information
Su-daa authored Jan 25, 2024
2 parents 0760038 + 3270519 commit 17ee02a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -200,6 +201,7 @@ public Optional<Order> findByProductIdAndStatus(Long productId, OrderStatus orde
return orderRepository.findByProductIdAndStatus(productId, orderStatus);
}

@Transactional(propagation = Propagation.REQUIRES_NEW)
public void cancelPayment(String impUid) {
List<PaymentCancelDetail> paymentCancelDetails = iamportRepository.cancelPaymentByImpUid(impUid);
paymentCancelDetailRepository.saveAll(paymentCancelDetails);
Expand Down

0 comments on commit 17ee02a

Please sign in to comment.