Skip to content

Conversation

@ense333
Copy link
Collaborator

@ense333 ense333 commented Jul 20, 2025

🛠️ 작업 내용

데이터 처리 간 무결성을 위해 바꾸다 보니 커밋 양이 좀 많아졌습니다....

  1. 우선 결제 응답 간 paymentKey 제거(노출되면 안되기 때문에 orderId를 통해 삭제 진행)

  2. 서비스에서 결제 진행 간
    우선 lessonParticipant에 데이터가 있어야 하고(수업 참여자만 결제 가능),
    중복 결제가 되면 안되고
    쿠폰 관련도 체크

  3. 서비스에서 결제 취소 간
    날짜 검증(24시간 전에는 취소 안되도록)
    취소 날짜 기간 한달전(minusMonth 메서드 있어서 30일에서 -> 한달로 다시 수정했습니다, figma에도 답글 남겨놨습니다) -> 100%
    취소 날짜 일주일 전 50%,
    취소 날짜 3일전 30%,
    취소 시 lessonParticipant 데이터 hard delete
    lesson 상태 변경 및 참여 가능 숫자 1증가

  4. mock 데이터에 lessonParticipant 데이터도 추가하도록 수정했습니다.

✅ PR 유형

  • 새로운 기능 추가
  • CSS 등 사용자 UI 디자인 변경
  • 코드 리팩토링
  • 파일 혹은 폴더명 수정

✅ Check List

  • 코드가 정상적으로 컴파일되나요?
  • 테스트 코드를 통과했나요?
  • merge할 브랜치의 위치를 확인했나요?
  • Label을 지정했나요?

🔗 관련 이슈

💬 기타 참고 사항

서비스에서 좀 더 분리가 가능한 부분(리팩토링)은 추후 이슈 파서 진행하겠습니다.

우선 결제 관련 구현은 전부 다 끝냈습니다.(api 명세에도 반영 완료 하였고 merge까지 된 경우에 다시 표시하겠습니다)

@ense333 ense333 self-assigned this Jul 20, 2025
@ense333 ense333 linked an issue Jul 20, 2025 that may be closed by this pull request
Copy link
Collaborator

@Ji-minhyeok Ji-minhyeok left a comment

Choose a reason for hiding this comment

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

확인했습니다 고생하셨습니다!


boolean existsByLessonIdAndUserId(Long lessonId, Long userId);

Optional<LessonParticipant> findByLessonIdAndUserId(Long lessonId, Long userId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

사용되는 부분을 추후에 공통 로직으로 빼야할지 고민해봐야겠군요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵 추후에 리팩토링 진행해봐도 좋을 것 같습니다!

return BaseResponse.ok("결제 취소 성공", payResult, HttpStatus.OK);
public ResponseEntity<BaseResponse<CancelPaymentResponseDto>> cancel(
@Valid @RequestBody CancelPaymentRequestDto request) {
return BaseResponse.ok("결제 취소 성공", paymentService.processCancel(request), HttpStatus.OK);
Copy link
Collaborator

Choose a reason for hiding this comment

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

더 깔끔한 응답 형태 반환인 것 같습니다! 참고해보겠습니다

@ense333 ense333 merged commit e350c50 into develop Jul 22, 2025
2 checks passed
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.

[Feat] 결제 서비스 추가

3 participants