[FEATURE] 결제 취소 기능 및 결제 내역 조회 기능 구현#215
Merged
EndlessMilkyway merged 9 commits intoAug 6, 2025
Merged
Conversation
friox
approved these changes
Aug 6, 2025
friox
left a comment
Contributor
There was a problem hiding this comment.
결제 과정을 메서드로 잘 분리해놓으셔서 흐름을 따라가는 데 수월했습니다!
코드 아주 깔끔해보입니다! 고생하셨습니다 👍👍
chanwonlee
approved these changes
Aug 6, 2025
chanwonlee
left a comment
Contributor
There was a problem hiding this comment.
전반적으로 메서드 분리를 깔끔하게 해주셔서 로직을 읽기 편했습니다.
두 분께서 고민하신 서비스 레이어 관련 부분은 저도 한 번쯤 생각해봤던 주제라, 시간이 더 있었다면 이 부분을 함께 개선해볼 수 있었을 텐데 하는 아쉬움이 남습니다... 수고 많으셨습니다!
Jimin730
approved these changes
Aug 6, 2025
Jimin730
left a comment
Contributor
There was a problem hiding this comment.
영렬님은 코드가 정말 깔끔한 것 같습니다..
결제 취소 및 내역 조회에 대한 부분 확인했습니다! 👍
영렬님과 승훈님이 서비스 계층 관련하여 고민을 나누신걸 보니 저도 해당 고민을 한 번 더 생각해볼 수 있어서 좋았습니다 :)
EndlessMilkyway
deleted the
feature/211-payment-cancel-and-history-implementation
branch
August 6, 2025 04:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
관련 Issue (필수)
주요 변경 사항 (필수)
결제 취소 기능 구현
결제 내역 조회 기능 구현
리뷰어 참고 사항
결제 취소 시 즉시 환불 처리가 되도록 임시 구현되어 있습니다. 실제 운영에서는 PG사 API 연동이 필요하지만, 현재는 내부적으로 상태만 변경하는 방식으로 구현했습니다.
결제 내역 조회 시 필요한 필드만 select하는 프로젝션을 사용하여 불필요한 데이터 로딩을 방지했습니다. 특히 연관 엔티티(Member, Reservation)의 모든 필드를 가져오지 않고 필요한 정보만 조회합니다.
결제 취소:
@Transactional로 원자성 보장결제 내역 조회:
@Transactional(readOnly = true)로 읽기 전용 최적화결제 취소와 내역 조회 모두
@AuthenticationPrincipal을 통해 로그인 사용자만 접근 가능하며, 본인의 결제 건만 처리할 수 있도록 검증 로직이 포함되어 있습니다.추가 정보
현재는 즉시 환불 처리되지만, 추후 PG사 API 연동 시 비동기 처리로 변경될 수 있습니다
QueryDSL 프로젝션을 활용하여 N+1 문제를 예방하고 성능을 최적화했습니다
PR 작성 체크리스트 (필수)