Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public ResponseEntity<PaymentResponse> completePayment(@RequestBody PortOneRespo
paymentGatewayService.verifyPaymentDetail(portOneResponseDto.getImpUid(), portOneResponseDto.getMerchantUid());

// 결제 성공 시 결제 및 테스크 상태 업데이트
paymentGatewayService.updatePaymentAndTaskStatus(portOneResponseDto.getMerchantUid());
// paymentGatewayService.updatePaymentAndTaskStatus(portOneResponseDto.getMerchantUid());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 주석처리 안하면 오류나나요??
선언적 트랜잭션 추가해서 되지 않나요??


return ResponseEntity.ok()
.body(new PaymentResponse(true, "결제 및 검증 성공", portOneResponseDto.getTaskId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public void validatePaymentAmount(PaymentGateway paymentGateway, BigDecimal port
}
}

@Transactional
public void updatePaymentAndTaskStatus(String merchantUid) {
Payment payment = paymentRepository.findByMerchantUid(merchantUid)
.orElseThrow(() -> new IllegalArgumentException("해당 merchantUid의 결제를 찾을 수 없습니다."));
Expand Down