From fcbdd9f4a6116029087ea44e6d9cc9730accf5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ritzl?= Date: Mon, 8 Jun 2020 15:55:48 +0200 Subject: [PATCH] Update index.md --- docs/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/index.md b/docs/index.md index 85aff33..5701929 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,6 +17,19 @@ We recommend using a link to a zip file of a [specific release](https://github.c The source code is available on [GitHub](https://github.com/defold/extension-iap) +## Differences between supported platforms + +Google Play and Amazon supports two different product types: subscriptions and consumable products. + +Apple supports three different product types: subscriptions, consumable and non-consumable products. + +If you want to simulate non-consumable products on Google Play/Amazon you need to make sure to not call `iap.finish()` on the product in question (and make sure to not have enabled Auto Finish Transactions in *game.project*). + +Calls to `iap.buy()` and `iap.set_listener()` will return all non-finished purchases on Google Play. (This will not happen on iOS) + +The concept of restoring purchases does not exist on Google Play/Amazon. Calls to `iap.restore()` on iOS will return all purchased products (and have product state set to TRANS_STATE_RESTORED). Calls to `iap.restore()` on Google Play will return all non-finished purchases (and have product state set to TRANS_STATE_PURCHASED). + +### # API reference