Repository navigation
docs: IAP 예제 지급 함수에 데모 경고 주석 추가 - #54
Merged
Merged
Conversation
SunYoungKwon
approved these changes
Oct 15, 2026
This was referenced Oct 15, 2026
Merged
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
--sample iap예제의 지급 함수(grantProduct)는 TODO 주석과console.info뿐인데,processProductGrant는 늘true를 반환하고 미결 주문 복구 루프도 지급 없이completeProductGrant를 부릅니다. 예제를 그대로 가져다 쓰면 결제한 사용자가 상품을 받지 못하는데, 데모라는 표시가 없어 실제로 그대로 쓴 공개 repo도 있었습니다(apps-in-toss-harness 쪽 제보).동작은 바꾸지 않고 IAP 예제 5종(react, react-ts, react-ts-tds, vanilla, vanilla-ts)에 주석만 추가했습니다.
grantProduct: 데모라서 아무것도 지급하지 않는다는 것, 지급 결과는 가급적 서버에 저장하고 같은 orderId로 두 번 지급하지 않아야 한다는 것, 인앱 결제 가이드 링크processProductGrant의return true: 실제로 지급에 성공했을 때만true, 실패하면false(미결 주문으로 남아 복구 흐름에서 다시 처리됨)restorePendingOrders의completeProductGrant: 지급에 성공한 주문만 완료 처리기준은 인앱 결제 가이드의 정상 결제 흐름과 미결 주문 복구 흐름입니다.
Checklist
.env등)이 포함되지 않았어요주석만 바꿔서 프로젝트 생성·실행은 따로 확인하지 않았습니다. README는 고칠 내용이 없습니다.
Release Notes
Test Results
yarn format:check,yarn lint: 통과yarn typecheck,yarn test(139개),yarn build: 통과. 주석 문구를 다듬기 전 리비전에서 돌렸고, 이후에는 주석만 바뀌었습니다.Linked Issues