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

[in_app_purchase] Handle PurchaseStatus.restored correctly in example. #4393

Merged
merged 1 commit into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/in_app_purchase/in_app_purchase/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.9

* Handle purchases with `PurchaseStatus.restored` correctly in the example App.
* Updated dependencies on `in_app_purchase_android` and `in_app_purchase_ios` to their latest versions (version 0.1.5 and 0.1.3+5 respectively).

## 1.0.8

* Fix repository link in pubspec.yaml.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ class _MyAppState extends State<_MyApp> {
} else {
if (purchaseDetails.status == PurchaseStatus.error) {
handleError(purchaseDetails.error!);
} else if (purchaseDetails.status == PurchaseStatus.purchased) {
} else if (purchaseDetails.status == PurchaseStatus.purchased ||
purchaseDetails.status == PurchaseStatus.restored) {
bool valid = await _verifyPurchase(purchaseDetails);
if (valid) {
deliverProduct(purchaseDetails);
Expand Down
6 changes: 3 additions & 3 deletions packages/in_app_purchase/in_app_purchase/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: in_app_purchase
description: A Flutter plugin for in-app purchases. Exposes APIs for making in-app purchases through the App Store and Google Play.
repository: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/in_app_purchase
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 1.0.8
version: 1.0.9

environment:
sdk: ">=2.12.0 <3.0.0"
Expand All @@ -20,8 +20,8 @@ dependencies:
flutter:
sdk: flutter
in_app_purchase_platform_interface: ^1.0.0
in_app_purchase_android: ^0.1.4
in_app_purchase_ios: ^0.1.1
in_app_purchase_android: ^0.1.5
in_app_purchase_ios: ^0.1.3+5

dev_dependencies:
flutter_driver:
Expand Down