Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 6f6cd78

Browse files
authored
[in_app_purchase] Adds additional explanation on the importance of completing a purchase (#5017)
1 parent f62168d commit 6f6cd78

3 files changed

Lines changed: 19 additions & 7 deletions

File tree

packages/in_app_purchase/in_app_purchase/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.2
2+
3+
* Adds additional explanation on why it is important to complete a purchase.
4+
15
## 3.0.1
26

37
* Internal code cleanup for stricter analysis options.

packages/in_app_purchase/in_app_purchase/README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ your app with each store. Both stores have extensive guides:
3232
* [App Store documentation](https://developer.apple.com/in-app-purchase/)
3333
* [Google Play documentation](https://developer.android.com/google/play/billing/billing_overview)
3434

35+
> NOTE: Further in this document the App Store and Google Play will be referred
36+
> to as "the store" or "the underlying store", except when a feature is specific
37+
> to a particular store.
38+
3539
For a list of steps for configuring in-app purchases in both stores, see the
3640
[example app README](https://github.com/flutter/plugins/blob/master/packages/in_app_purchase/in_app_purchase/example/README.md).
3741

@@ -190,11 +194,15 @@ if (_isConsumable(productDetails)) {
190194

191195
### Completing a purchase
192196

193-
The `InAppPurchase.purchaseStream` will send purchase updates after
194-
you initiate the purchase flow using `InAppPurchase.buyConsumable`
195-
or `InAppPurchase.buyNonConsumable`. After delivering the content to
196-
the user, call `InAppPurchase.completePurchase` to tell the App Store
197-
and Google Play that the purchase has been finished.
197+
The `InAppPurchase.purchaseStream` will send purchase updates after initiating
198+
the purchase flow using `InAppPurchase.buyConsumable` or
199+
`InAppPurchase.buyNonConsumable`. After verifying the purchase receipt and the
200+
delivering the content to the user it is important to call
201+
`InAppPurchase.completePurchase` to tell the underlying store that the
202+
purchase has been completed. Calling `InAppPurchase.completePurchase` will
203+
inform the underlying store that the app verified and processed the
204+
purchase and the store can proceed to finalize the transaction and bill
205+
the end user's payment account.
198206

199207
> **Warning:** Failure to call `InAppPurchase.completePurchase` and
200208
> get a successful response within 3 days of the purchase will result a refund.
@@ -229,7 +237,7 @@ InAppPurchase.instance
229237

230238
When the price of a subscription is changed the consumer will need to confirm that price change. If the consumer does not
231239
confirm the price change the subscription will not be auto-renewed. By default on both iOS and Android the consumer will
232-
automatically get a popup to confirm the price change, but App developers can override this mechanism and show the popup on a later moment so it doesn't interrupt the critical flow of the App. This works different on the Apple App Store and on the Google Play Store.
240+
automatically get a popup to confirm the price change, but App developers can override this mechanism and show the popup on a later moment so it doesn't interrupt the critical flow of the App. This works different for each of the stores.
233241

234242
#### Google Play Store (Android)
235243
When the subscription price is raised, the consumer should approve the price change within 7 days. The official

packages/in_app_purchase/in_app_purchase/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: in_app_purchase
22
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
33
repository: https://github.com/flutter/plugins/tree/main/packages/in_app_purchase/in_app_purchase
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
5-
version: 3.0.1
5+
version: 3.0.2
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"

0 commit comments

Comments
 (0)