Fix: 부분 취소는 거부하고, 환불 금액 및 포인트를 결제 기준으로 파생하도록 수정 - #415
Merged
Conversation
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.
✅ PR 설명
결제 취소 시 클라이언트가 보낸 cancelAmount를 결제 금액과 대조하지 않고 그대로 사용해, 부분 취소 요청 시 데이터가 사방으로 어긋나는 문제를 수정했습니다.
예를 들어 30,000원 결제에 cancelAmount=1,000(카탈로그의 유효 가격)을 보내면 Toss는 1,000원만 취소, 포인트는 100P만 차감(지급됐던 건 4,000P), 환불 로그는 -4,000P로 기록, 결제 상태는 통째로 CANCELED가 되어 Toss, 포인트, 로그, 상태 네 곳이 서로 다른 값을 갖게 됐습니다.
이에 취소는 오직 전액 취소로만 고정하여 부분 취소는 명시적으로 거부하며, 환불 금액과 차감 포인트를 클라이언트 값이 아닌 결제 정보에서 파생하도록 변경했습니다.
🏗 작업 내용
📸 테스트 결과 (선택)
🔗 관련 이슈 (선택)
🚨 참고 사항 (선택)