Android Question In-app purchases foes

MitchBu

Well-Known Member
Licensed User
Longtime User
I have been trying to implement in-app purchase, following guidelines in https://www.b4x.com/android/forum/threads/googleplaybilling-in-app-purchases.109945/#content

I have copied all the necessary class from the example project, and set my app with the ID and key (key shortened here to keep legibility).

B4X:
    '--- Billing ---
    Public billing As BillingClient
    Public AdsRemoved As Boolean
    Public const ADS_SDK_ID As String = "com.bujardet.checkprinter" '"android.test.purchased"
    Public const BILLING_KEY As String = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlEHo5et/XIqI6r69unK8GAjl.../..."
    Public billing As BillingClient
    Public InAppSupported As Boolean

The app has been added as in-app purchases in the Play Store:
in-app products.png


When I do a test buy while logged with my developer account, I get the test buy dialog:

Test buy.jpg


Now, when I use my buyer account, I get either "This version of the application is not configured for billing through Google Play", or "The item you requested is not available for purchase".

Not configured.jpg


Not available for purchase.jpg


I have read and read again these:


I don't know what to do. I am probably thick, and am sorry, but I am at a loss, here.

Any help will be most appreciated.
 

MitchBu

Well-Known Member
Licensed User
Longtime User
Thank you Erel. That is the thing. I have added the app in the Play Store for In App Purchase, it shows up fine in test buy mode, but not when I use a buyer account. I don't understand why it reports the app is not available for purchase.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
I am planning to upload it to the Play Store, so I will be able to download it with a different device.
If you don't upload the app (even in alpha or beta) to the Google Console, you don't see the option to buy the item, only the test option.
Make sure that you create the item to buy in the Play Console.
 
Upvote 0
Top