Flutter Google Play Store In-App-Purchase Product isn't found

Viewed 659

My goal is to create a one-year subscription that doesn't renew itself. As far as I understood, this is done with a consumable on Android and with a non-renewing subscription on IOs. Then, I have a premium_ads.dart screen in my app which shows the premium features and a button to buy them. It is a stateful widget with an _initState() async method that fetches the product from the Storefront:

  void _initState() async {
    InAppPurchaseConnection.enablePendingPurchases();
    final state = await InAppPurchaseConnection.instance.isAvailable();
    print(state);
    setState(() => available = state);
    if (!available) return;
    Set<String> pIds = Set<String>();
    pIds.add("premium");
    final res =
        await InAppPurchaseConnection.instance.queryProductDetails(pIds);
    if (res.error != null) {
      print("Error: " + res.error.toString());
    }
    print(res.productDetails);
    if (res.productDetails.length == 0) {
      setState(() => available = false);
      return;
    }
    setState(() => premium = res.productDetails[0]);
  }

Further, I will provide screenshots of the registered Product on Play Store and App Store: App Store Product enter image description here

When entering the screen, the _initState() method is called and I get following output:

true
[]

Additional Information: I've uploaded signed binaries to both app store and play store, but they haven't been reviewed yet. I'm not sure if that has any impact on my issue.

I tried to fix it again today, and the product is found on IOs now, however on Android, it still isn't found.



Thanks in advance for your help!

0 Answers
Related