feat(ads): 보상형 광고 크리스탈 충전 기능 추가 - #242
Merged
Merged
Conversation
ad_reward_sessions(세션)·ad_reward_logs(감사 로그) 테이블 두개 추가 및 마이그레이션 추가, 엔티티·리포지토리(비관적 락 조회, 활성 세션 만료 포함) 추가
요청 받은 원본 쿼리 그대로 Tink로 SSV 콜백 서명 검증, 결과를 유효/무효/일시오류로 구분
quote(부족분 미리보기)·createSession(세션 발급)·getStatus(폴링) 세가지 서비스 로직 구현, 에러코드 3종 추가
SSV 콜백 처리 + 멱등 지급(비관적 락·txid·상태), 광고 보상 컨트롤러(/ad-rewards) 연결
지급/멱등/만료/세션 발급·조회/콜백 분기/E2E 흐름 검증
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)
크리스탈(인앱 재화)이 부족해 PDF 내보내기·물어보기를 이용할 수 없을 때, 보상형 광고(AdMob Rewarded)를 시청하면 AdMob의 서버 사이드 검증(SSV) 콜백을 받아 부족한 만큼 크리스탈을 지급하는 기능입니다. domain/ads 도메인을 신설했습니다.
동작 방식
요청 흐름
검증 · 중복 지급 방지
데이터 · 개인정보
테스트: 지급 / 중복 / 만료 / 서명 무효 / 세션 생성·조회 / 콜백 분기 / 전체 흐름에 대한 통합·단위 테스트를 추가했습니다.
🔗 Related Issue
💬 공유사항
✅ PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.