Reputation: 2697
I try to run IAP (in-app-purchase) example apps that provided by flutter here: https://github.com/flutter/plugins/tree/master/packages/in_app_purchase/example
I follow all step, except upload signed App Bundle
instead of APK to Alpha Phase at Google Play Console.
However, when i open the screen example, it said warning:
Consumable, Upgrade, Subscription Not found, This app need special configuration to run. Please see example/README.md for instructions.
so, all of my IAP items that has been created at play console not appear.
Any idea to solve ?
Upvotes: 6
Views: 1597
Reputation: 101
In order to use in-app-purchase plugin in flutter, need to make sure of the following :
The bundle id match the bundle id you have on apple store or android store , for example for apple store in https://appstoreconnect.apple.com
create app if you not yet made one then make sure the bundle id same as you have in flutter application, also you can use this package in flutter to update the package name https://pub.dev/packages/change_app_package_name
, note this need to be done once and always you need to update the application with the same bundle id
For apple store need to add permission in app purchase for billing in xcode as in picture and for android in permissions need to add
In Apple store if its new need to configure the tax, go to https://appstoreconnect.apple.com
then select agreement, tax then fill the form for paid app and then the process will take 1-3 days until you see active beside the paid app
You need to create the payment way in store, for example consumable to create it with price and details and the name of it , then you put the name in the configuration in the code as shown in example you can check the example here https://pub.dev/packages/in_app_purchase/example
. For example create new name for consumable in store and update that name in the variable _kConsumableId and put in _kProductIds the variables which here _kConsumableId and remove other variables
Upvotes: 0
Reputation: 51
Because you do not change the Demo product id to your ID !
const String _kConsumableId = 'consumable';
const List<String> _kProductIds = <String>[
_kConsumableId,
'upgrade',
'subscription'
];
Upvotes: 5
Reputation: 1
I follow all step, except upload signed App Bundle instead of APK to Alpha Phase at Google Play Console.
There's your problem... you need to upload a signed APK or you'll get that error. You can just upload it to the Alpha channel so nobody receives it.
You also need to make sure you have this permission in your manifest:
<uses-permission android:name="com.android.vending.BILLING" />
Hope this helps.
Upvotes: 0