I’ve developed a Flutter application and have recently started testing its in-app purchase features. Here’s what I’ve done so far:
I’ve successfully uploaded my app for internal testing on the Google Play Console.
I added tester emails in both the “Testers” tab under the internal testing section and in the “License Testing” section.
I installed the app from Google Play using one of the tester emails, and the in-app purchase features (InAppPurchase.instance.queryProductDetails and InAppPurchase.instance.buyNonConsumable)
worked perfectly in this version.
However, I’m facing an issue when running the app directly from Android Studio in debug mode:
The InAppPurchase.instance.queryProductDetails
still retrieves product details correctly.
But, when attempting to use InAppPurchase.instance.buyNonConsumable
in debug mode, it fails and returns an error stating that the “item could not be found.”
Note: It’s important to mention that InAppPurchase.instance.buyNonConsumable
works as expected with purchase tasks in the app that I installed from Google Play, but it does not work when running the app in debug mode directly from Android Studio.
I’m looking for insights or suggestions on why InAppPurchase.instance.buyNonConsumable does not work in debug mode or why it reports that the product is not found. Any advice on how to properly test this functionality in a development environment would be greatly appreciated.
Thank you!