Replies: 2 comments 1 reply
-
|
Key Difference: Both approaches call your backend, but they serve different purposes and are used at different times: 1.
2.
Why the difference?
From the docs: From the docs:
However, you should validate before granting access, not before finishing. Practical Flow: Summary Table:
Bottom line: They're complementary, not redundant. One validates authenticity, the other prevents duplicate processing. Use both. 🤖 Generated by gitdog.dev · Have more questions? Tag |
Beta Was this translation helpful? Give feedback.
-
|
@GitDog Good explanation! One small addition for the if (await isAlreadyProcessed(purchase)) {
await finishTransaction({purchase});
} else {
// Don't forget this case!
const isValid = await validatePurchaseOnServer(purchase);
if (isValid) await processPurchase(purchase);
await finishTransaction({purchase});
}The docs example only shows the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
what a different here: https://hyochan.github.io/expo-iap/guides/purchases#pending-and-unfinished-purchases
and
isAlreadyProcessed
this is different calls to backend ?
Beta Was this translation helpful? Give feedback.
All reactions