[Feat] Toss 취소 실패 시 DLQ 적재 및 스케줄링 기반 환불 재시도 구현#208
Merged
today-is-first merged 16 commits intomainfrom May 23, 2025
Merged
Conversation
ROLLBACK_FAILED 추가
findRefundReceiptByOrderId(), findCancelFailLogByOrderId() 추가
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.
개요
Resolves: #203
PR 유형
어떤 변경 사항이 있나요?
작업 내용
🔁 DLQ 및 환불 재시도 흐름
CancelDLQServiceImplpayment:cancel:queue)에 JSON 메시지 적재CancelRetryServiceImplrefund_receipt저장cancel_fail_log테이블 insertScheduledCancelRetryWorker✅ 응답 구조 변경
PaymentResultResponseROLLBACK_PENDING응답 타입 추가ROLLBACK_REFUNDED(자동 환불 완료),ROLLBACK_FAILED(3회 실패) 기존 유지PaymentUsecaseROLLBACK_PENDING반환📦 관련 클래스 / 리팩토링
CancelRetryPayloadRefundReasontoDbValue,fromDbValue)CancelFailLogDTOPaymentDAOfindIdByOrderId,insertCancelFailLog메서드 추가RefundReceiptServiceImpl/api/payments/result/{orderId}GET API 구현 (DeferredResult 기반 롱폴링 응답)PaymentResultResponse에 SYSTEM_ERROR 상태 추가RefundReceiptDTO,CancelFailLogDTO→ toTossConfirmResponse() 추가PaymentStatusServiceImpl→ 환불 성공/실패/미처리 분기 구현PaymentDAO및 Mapper 쿼리 구현 (payment 조인 포함)