Conversation
docs: 프론트 사용처 기준으로 Swagger 문서 구체화
docs: 프론트 사용처 기준으로 Swagger 문서 구체화
…-message feat: 토스 링크페이 결제완료 웹훅 문자 발송 추가
|
Caution Review failedPull request was closed or merged during review Walkthrough이 PR은 광범위한 Swagger/OpenAPI 문서화 주석을 추가하고, TossPayments 웹훅 결제 알림 기능과 CoolSMS 비동기 알림 서비스를 신규 구현하며, 관련 설정 파일과 테스트 클래스를 추가합니다. Changes
Sequence Diagram(s)sequenceDiagram
actor Client
participant Controller as TossPayments<br/>WebhookController
participant AsyncService as TossPayments<br/>WebhookAsyncService
participant OrderService as TossPayments<br/>OrderService
participant SMSService as CoolSMS<br/>Service
participant ExternalAPI as Toss Payments<br/>LinkPay API
Client->>Controller: POST /webhook/tosspayments<br/>(eventType, paymentKey, orderId)
Note over Controller: shouldProcess()를 통해<br/>이벤트 유형 및 상태 검증
alt 검증 성공
Controller->>AsyncService: processPaymentCompleted(paymentKey, orderId)<br/>@Async로 비동기 실행
Note over AsyncService: 결제 정보 조회 및<br/>회비 결제 여부 확인
AsyncService->>OrderService: getPaymentByOrderId(orderId)
OrderService->>ExternalAPI: GET /orders/{orderId}<br/>(Authorization: Basic)
ExternalAPI-->>OrderService: 고객정보 포함 응답 JSON
Note over OrderService: JSON 파싱 및<br/>필드 추출 (여러 경로 시도)
OrderService-->>AsyncService: TossPaymentCustomerInfo<br/>(customerName, customerPhone)
alt 회비 결제 + 전화번호 존재
AsyncService->>SMSService: sendPaymentCompletedMessage(phone, name)
Note over SMSService: 전화번호 정규화 및<br/>메시지 템플릿 생성
SMSService-->>AsyncService: 성공/실패 로그
else 회비 결제 아님 또는<br/>전화번호 없음
Note over AsyncService: SMS 발송 스킵
end
else 검증 실패
Note over Controller: shouldProcess() 실패 시<br/>즉시 반환
end
Controller-->>Client: 200 OK<br/>(항상 성공 응답)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
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.
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선 사항