Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PlatformException (PlatformException(storekit_no_receipt, Cannot find receipt for the current main bundle., null))
- Future<void> _getPastPurchases() async {
- try {
- //final QueryPurchaseDetailsResponse response = await _iap.queryPastPurchases();
- final QueryPurchaseDetailsResponse response = await InAppPurchaseConnection.instance.queryPastPurchases();
- if (response.error != null) {
- // Handle the error
- print(response.error.toString());
- }
- print('response = ' + response.toString());
- for (PurchaseDetails purchase in response.pastPurchases) {
- if (Platform.isIOS) {
- //InAppPurchaseConnection.instance.completePurchase(purchase);
- }
- }
- setState(() {
- _purchases = response.pastPurchases;
- });
- } on PlatformException catch(err) {
- print(err.toString());
- }
- catch (err) {
- print(err.toString());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement