Hi everybody
I'm pulling my hair out as trying to in App Purchase - test subscription working in my App with the play store but its always outputting an error message after going through the In app billing test subscription on my android
test device - My App is published on the Internal test track in the play store can I have created the subscription in there and added my Google accounts for licence testing and put in the InAppPurchaseSetKeys from play store the Base64-encoded RSA public key and have put all the code into my game following the in App Purchase tutorials.
it comes up with the test purchase menu for the subscription and allows me to go through and purchase but after checkout completes it throws up an error message box and returns: Purchase Result: IAB returned null puchaseData or dataSignature (response: -1008:Unknown error)
and GetInAppPurchaseAvailable does not change to 1 however when I restart the app GetInAppPurchaseAvailable now equals 1 and the subscription works. However I can't release the App live with this error message showing and having to restart the app to get the purchase to work.
I have tried goggling what I can about this and in stack overflow I found something about this problem
( If you call mHelper.launchPurchaseFlow(...) with an SKU that is registered as a subscription on Google Developer Console it will result in the error: IAB returned null purchaseData or dataSignature (response -1008:Unknown error).
If you have a SKU that is registered as an subscription you have to use the method: mHelper.launchSubscriptionPurchaseFlow(...) instead.)
However I take it mHelper.launchPurchaseFlow(...) is Java code ???
AGK Tier 1 basic and DarkBasic are the only programming languages I know
So I still have not been able to solve this problem.
Here is my In App Purchase AppGameKit code
// app title
InAppPurchaseSetTitle ( "Gold VIP Tips - 1 Month Subscription" )
// keys for android
InAppPurchaseSetKeys ( "my RSA public key ", "" )
// products that our app has
InAppPurchaseAddProductID ( "halftime.goldviptips.monthsubscription", 0 )
// initial set up
InAppPurchaseSetup ( )
// restore any non-consumable products on iOS - automatic on Amazon and Android
InAppPurchaseRestore ( )
And then my code to check for the purchase
// Request to purchase upgrade from store
InAppPurchaseActivate(0) // 0 = id of product
// Wait for user to purchase or cancel prompt
While GetInAppPurchaseState() = 0
Sync()
EndWhile
// User has canceled or already purchased
If GetInAppPurchaseAvailable(0) < 1
//
`Message("Canceled or already purchased Condition")
Endif
// User has upgraded!
If GetInAppPurchaseAvailable(0) = 1
Message("PURCHASED SUBSCRIPTION")
// ... (unlock features, etc).
goldvip_active = 1
Endif
I'm starting to wonder is it me doing something wrong or are in app purchase subscriptions not working in AppGameKit?
If somebody could help I would be incredibly grateful.