Android IAP

I am trying to integrate In App purchases in my game. I have used the IAP sample code from corona and when using the Test product ID’s i.e. “android.test.purchased” it seems to be working fine.

When I try to use my own product ID’s I get a popup Error: Item not found. I have my apk uploaded to the Android developer console (saved as draft not published) and have my IAP product list setup. I also have my email included in the license testing access, which is the main account on my phone.

In the Android tutorial is says the products have to be published, on my console this is shown as active. I am assuming this is the same as published?

Is there anymore that can give me some pointers to test purchasing these products. 

Would really appreciate some help with this

Thanks,

Phil

I’m having the same problem, when loading the products, I cannot load them, although if I go to the store with the product ID then it does show up, but when loading the product list the callback is never called.

BTW seems that the android appstore doesn’t support loading products: check this out: 

http://docs.coronalabs.com/api/library/store/canLoadProducts.html

How do we get localized price then? any clue on this?

I am only using 3 products, so I have hardcoded, and display in my app. I am not exactly sure how this works. 
 
[lua]
 
– Product IDs for the “google” Android Marketplace store.
    local googleProductList =
    {
        – These product IDs are used for testing and is supported by all Android apps.
        – Purchasing these products will not bill your account.
        “my_own_productId”,
        “android.test.purchased”,            – Marketplace will always successfully purchase this product ID.
        “android.test.canceled”,            – Marketplace will always cancel a purchase of this product ID.
        – “android.test.item_unavailable”,    – Marketplace will always indicate this product ID as unavailable.
    }
[/lua]
 
This is my product list, I included my own id to see how it would work. I am I missing something?

I was pointint to the line where it says:

“this will return false for the Google Play Store since that store does not support store.loadProducts().”

Seems that android can’t load productS? but I was wondering then, how do you get localized names, prices and all… I guess some staff should answer… :S

In your specific case try to call store.purchase( { yourid } ) and see if the store opens and shows the irght info. In my case it does, it’s just the load products that doesn’t work properly.

Yes I am calling store.purchase( {productId} ), I get to the play store, then get popup item not found. 

Couple of questions for you, are your products active/inactive in the android developer console?

My app is unpublished, so is only in there as a draft, but it said this is fine for testing in app purchases.

Yes I get my product shown, just make sure to use a different account from your google account. Add it to the test accounts, then you shoudl see the market with the product.

Make sure that you got your “com.yourcompany.productname.etc” exactly the same as you’re calling it in your app, and directly load products with it, even if the callback is not being call.

that’s all I’ve done, and it works fine, 

I’ve got my app in “draft” and my products in “pending activation” -> activated but waiting for app to go live. 

Thanks matrix2000, I literally just checked the the package name just now to make sure it was the same as the package name of my app. It is working now, my 3 buttons for purchasing in the app are linking with the play store

I’m very glad to hear that ;) 

I asked this in another topic a few days without any reply from Ansca: http://forums.coronalabs.com/topic/34158-if-google-play-doesnt-use-storeloadproducts-how-do-you-get-the-item-prices/

I think it’s a very important point, as I would rather not have to hardcode every single localized name + price.

Edit: And I’ve just noticed that you were the other person who replied maxtrix2000. Hopefully it being in 2 topics will increase the chance of someone helping us with it.

I’m having the same problem, when loading the products, I cannot load them, although if I go to the store with the product ID then it does show up, but when loading the product list the callback is never called.

BTW seems that the android appstore doesn’t support loading products: check this out: 

http://docs.coronalabs.com/api/library/store/canLoadProducts.html

How do we get localized price then? any clue on this?

I am only using 3 products, so I have hardcoded, and display in my app. I am not exactly sure how this works. 
 
[lua]
 
– Product IDs for the “google” Android Marketplace store.
    local googleProductList =
    {
        – These product IDs are used for testing and is supported by all Android apps.
        – Purchasing these products will not bill your account.
        “my_own_productId”,
        “android.test.purchased”,            – Marketplace will always successfully purchase this product ID.
        “android.test.canceled”,            – Marketplace will always cancel a purchase of this product ID.
        – “android.test.item_unavailable”,    – Marketplace will always indicate this product ID as unavailable.
    }
[/lua]
 
This is my product list, I included my own id to see how it would work. I am I missing something?

I was pointint to the line where it says:

“this will return false for the Google Play Store since that store does not support store.loadProducts().”

Seems that android can’t load productS? but I was wondering then, how do you get localized names, prices and all… I guess some staff should answer… :S

In your specific case try to call store.purchase( { yourid } ) and see if the store opens and shows the irght info. In my case it does, it’s just the load products that doesn’t work properly.

Yes I am calling store.purchase( {productId} ), I get to the play store, then get popup item not found. 

Couple of questions for you, are your products active/inactive in the android developer console?

My app is unpublished, so is only in there as a draft, but it said this is fine for testing in app purchases.

Yes I get my product shown, just make sure to use a different account from your google account. Add it to the test accounts, then you shoudl see the market with the product.

Make sure that you got your “com.yourcompany.productname.etc” exactly the same as you’re calling it in your app, and directly load products with it, even if the callback is not being call.

that’s all I’ve done, and it works fine, 

I’ve got my app in “draft” and my products in “pending activation” -> activated but waiting for app to go live. 

Thanks matrix2000, I literally just checked the the package name just now to make sure it was the same as the package name of my app. It is working now, my 3 buttons for purchasing in the app are linking with the play store

I’m very glad to hear that ;) 

I asked this in another topic a few days without any reply from Ansca: http://forums.coronalabs.com/topic/34158-if-google-play-doesnt-use-storeloadproducts-how-do-you-get-the-item-prices/

I think it’s a very important point, as I would rather not have to hardcode every single localized name + price.

Edit: And I’ve just noticed that you were the other person who replied maxtrix2000. Hopefully it being in 2 topics will increase the chance of someone helping us with it.