Google IAP - Product details for subscription is not showing up. Need little info

I am not getting the details related to subscription in the call

store.loadProducts( productIdentifiers, productListener ) Its showing up as invalid products.
But I am getting details related to other consumables.

{ invalidProducts = { "product\_identifier" }, name = "productList", products = {} }

This is the response.

I am not sure something is wrong with google or corona. But i am able to purchase the product. I need the details to show localized price. Also for subscription I am using puchaseSubscrption function.

Any information would be helpful…

Can you file a bug report on this? A small demo app that shows the problem would be useful.

Rob

Bug as been reported!

Madan

I had the same problem since i started to integrate the subscriptions payment method in the app we are developing at my company. At the begining i thought it was no  way to build the subscription products load from the google play store without hard coding it, but today I found the solution after read the plugin code (here) and testing it.

The problem comes with the iap.v3 plugin docuementation. They say the plugin signature is the following:

store.loadProducts( productIdentifiers, productListener )

but it’s not quite true. The loadProducts method accepts these two ways of  call:

store.loadProducts( managedProductIdentifiers, productListener )

and

store.loadProducts( managedProductIdentifiers, subscriptionProductIdentifiers, productListener )

They test if the second parameter it’s a lua table and then they request it as subscriptions. When the second parameter it’s the listener they don’t  query the subscription products. In the listener the products key it’s returned as a single array with all the products managed and subscriptions.

You can find the reference at the plugin implementation of loadProducts (here line 213 to 265).

With that method in combination with another undocumented method _purchaseSubscription _it seems to work well.

Hope this help you and other people having the same problem.

I’m having the same problem - my subscription products are being returned from Google Play as .invalidProducts - but I’m not using Enterprise, so am I out of luck? Is it broken for Corona PRO ?

I remember having ads in a previous version, and this was working without difficulty about 18 months ago.

I’ve made sure to upload the APK to the beta console in our Google developer account. But when I install my APK via USB cable, the identical version to what is in Google Play Beta, the products are showing up as invalid, and I’ve tried everything I can think of.

Can anyone help tell me determine what I’m doing wrong?

Update: Still not working on Android. It seems to be working for me on iOS.

@Catalin8, the solution you came up with - it requires Enterprise, right? Is this something that Corona needs to fix for us non-Enterprise users?

@Rob, using loadProducts, iOS is picking my subscription product fine. But Google Play is showing it as an invalid product, even though GP is showing my new subscription product as “Active”, and I’ve been sure to upload the APK into Beta release. Is Corona SDK still supporting Google Play subscriptions as part of the loadProducts list? I had this working about 18 months ago - the same code now, isn’t and I"m experiencing exactly what @catalin8 described here. Any thoughts?

@troylyndon the subscription products are supported (this is not mentioned in the documentation), but only passing it in a different list as a second parameter with loadProducts method as i mentioned before loadProducts(managedIdsList, subscriptionIdsList, listener). You will receive the results with the managed and subscriptions in the same list of products. To purchase a subscription you must use the method purchaseSubscription instead of purchase.

For ios it’s working as expected with loadProducts(productIdsList, listener) and with the purchase method.

On the other hand we have been using Corona Enterprise, but we have moved to Corona native. We received the license for splash screen until the enterprise expire, so i think you don’t need any license for that. Maybe somebody from @corona can explain it to us. 

@catalin8, you are the man! The product is now in the list. Thank you.

@Rob, I really think you should add this point to your documentation.

Please go to the relevant documentation page and use the “Report an issue” button at the bottom. Provide details and an example if you can.

Thanks!

Rob

Until Corona updates its documention for loadProducts, which I have just reported, this solution solves this problem of loading products with subscriptions.

HOWEVER, the store.purchase does bring up the purchase dialog properly, but then the transaction fails because of something Corona needs to do. So, I would not recommend attempting this until Corona supports subscription purchases properly for Android.

SYNTAX
store.loadProducts( productIdentifiers, subscriptionIdentifiers, productListener )

subscriptionIdentifiers (optional)

Table. An array of strings indicating a list of subscription product identifiers.
 

1 Like

@Rob, even though the code above does load subscription products after the consumable products in the array, when I choose store.purchase(subscriptionID) it does bring up the proper subscription to complete the purchase, but unfortunately, the transactionCallback fails

In transactionCallback    failed
state=failed
Transaction failed, type:    -1008    IAB returned null purchaseData or dataSignature (response: -1008:Unknown error)    ulmoves

(NOTE: ulmoves is my subscription ID)

How soon can Corona fix this? I can see why the subscriptionsIDs were not documented in the loadProducts function.

https://developer.android.com/google/play/billing/billing_java_kotlin

@troylyndon To achieve the purchase of a subscription you should use the method store.purchaseSubscription(subscriptionID) in Android. It’s an undocumented method, but it seems to work correctly. I have tested it last weeks and i didn’t found any issue.

1 Like

@catalin8, seems to work, THANK YOU

Can you file a bug report on this? A small demo app that shows the problem would be useful.

Rob

Bug as been reported!

Madan

I had the same problem since i started to integrate the subscriptions payment method in the app we are developing at my company. At the begining i thought it was no  way to build the subscription products load from the google play store without hard coding it, but today I found the solution after read the plugin code (here) and testing it.

The problem comes with the iap.v3 plugin docuementation. They say the plugin signature is the following:

store.loadProducts( productIdentifiers, productListener )

but it’s not quite true. The loadProducts method accepts these two ways of  call:

store.loadProducts( managedProductIdentifiers, productListener )

and

store.loadProducts( managedProductIdentifiers, subscriptionProductIdentifiers, productListener )

They test if the second parameter it’s a lua table and then they request it as subscriptions. When the second parameter it’s the listener they don’t  query the subscription products. In the listener the products key it’s returned as a single array with all the products managed and subscriptions.

You can find the reference at the plugin implementation of loadProducts (here line 213 to 265).

With that method in combination with another undocumented method _purchaseSubscription _it seems to work well.

Hope this help you and other people having the same problem.

I’m having the same problem - my subscription products are being returned from Google Play as .invalidProducts - but I’m not using Enterprise, so am I out of luck? Is it broken for Corona PRO ?

I remember having ads in a previous version, and this was working without difficulty about 18 months ago.

I’ve made sure to upload the APK to the beta console in our Google developer account. But when I install my APK via USB cable, the identical version to what is in Google Play Beta, the products are showing up as invalid, and I’ve tried everything I can think of.

Can anyone help tell me determine what I’m doing wrong?

Update: Still not working on Android. It seems to be working for me on iOS.