Skip to content

fix: 티켓 취소 검증 추가 - #234#235

Merged
sjk4618 merged 1 commit into
devfrom
fix/#234
Feb 1, 2026
Merged

fix: 티켓 취소 검증 추가 - #234#235
sjk4618 merged 1 commit into
devfrom
fix/#234

Conversation

@sjk4618
Copy link
Copy Markdown
Member

@sjk4618 sjk4618 commented Feb 1, 2026

🔥Pull requests

⛳️ 작업한 브랜치

👷 작업한 내용

  • 티켓 취소 검증 추가

🚨 참고 사항

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 1, 2026

📝 Walkthrough

Summary by CodeRabbit

  • 버그 수정
    • 이미 사용되었거나 이전에 취소된 티켓에 대한 환불 요청을 방지하는 검증 로직을 추가했습니다. 유효하지 않은 환불 시도 시 사용자에게 명확한 오류 메시지를 표시합니다.

✏️ Tip: You can customize this high-level summary in your review settings.

개요

티켓 취소 시 사용됨(USED) 또는 취소됨(CANCELED) 상태의 티켓이 있을 경우 환불을 방지하기 위한 검증 로직과 관련 오류 코드가 추가되었습니다.

변경 사항

코호트 / 파일 요약
결제 서비스 검증
src/main/java/com/permitseoul/permitserver/domain/payment/api/service/PaymentService.java
cancelPayment 메서드에 validateTicketStatusForCancel 검증 메서드 추가. 티켓 목록을 순회하며 USED 또는 CANCELED 상태의 티켓이 있으면 PaymentBadRequestException 발생. 파일 내에 동일한 메서드의 중복 구현이 있음.
오류 코드 정의
src/main/java/com/permitseoul/permitserver/global/response/code/ErrorCode.java
새로운 오류 코드 2개 추가: CONFLICT_ALREADY_USED_TICKET_CANCEL (409, 40908)과 CONFLICT_ALREADY_CANCELED_TICKET_CANCEL (409, 40909). 이미 사용하거나 취소된 티켓으로 인한 환불 불가 상황을 구분.

예상 코드 리뷰 소요 시간

🎯 3 (보통) | ⏱️ ~20분

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항의 주요 내용을 명확히 설명하고 있습니다. 티켓 취소 검증 추가라는 핵심 변경 사항을 간결하게 나타내고 있습니다.
Description check ✅ Passed PR 설명이 변경 사항과 관련이 있으며, 작업 내용으로 '티켓 취소 검증 추가'를 명시하고 있어 변경 사항을 설명하고 있습니다.
Linked Issues check ✅ Passed PR의 코드 변경 사항이 #234 이슈의 목적인 '티켓 취소 시의 검증 로직 추가'를 충족하고 있습니다. validateTicketStatusForCancel 메서드 추가와 새로운 에러 코드로 검증 로직을 구현했습니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 #234 이슈의 범위 내에 있습니다. PaymentService에 검증 메서드 추가와 ErrorCode에 관련 에러 코드 추가만 포함되어 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#234

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sjk4618 sjk4618 merged commit dfb3d1d into dev Feb 1, 2026
2 checks passed
@sjk4618 sjk4618 deleted the fix/#234 branch February 1, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 티켓 취소 검증 추가

1 participant