How to restore non-consumable content?

Hello

On my current project i am working on, we have several non-consumable content we wish to check for with

“store.restore()”. How do I get the status (bought or not) for each of this objects?

I mean I know i can’t use store.restore(productID) because this is not how it works, but can i get the status of each object with:

store.loadProducts( listOfProducts, productCallback ) ?

It get the list of products with there information but does this information contain information on weather or not the product has been bought already or not? if so what value should i use?

Thank you for reading, any assistance will be greatly appreciated.

Saiphan Brunner

When you call store.restore() you will get a series of call backs to the listener.  For iOS they will be a “restored” event, for Google they will be “purchases”.   When you get them, you just process them as if they were new, that is unlock whatever feature you need to unlock.

Rob

Rob Miracle, first of all thank you for your reply.

Second is, I already knew about the “purchase” return on google play, But from what I can see in your answer, are you telling me that I can check inside the   ‘elseif(tstate==“purchase”)    [ HERE  ]  else…’    part for soething like:

if(‘something’==“myProductID”) then

            --unlock product content here

end

Is that what you mean? If so what is that ‘something’ I should be able to compare against my product ID? Is it the json response?

If so and it may sound like a noob question can you give me an example of how would I do that with that response?

Thanks for your time

if transaction.productIdentifier == “com.yoursite.yourproduct” then

Thank you very much. I will check it later to see if everything is ok.

That small piece of code is probably all i needed.

Thanks again Rob, very appreciated.

When you call store.restore() you will get a series of call backs to the listener.  For iOS they will be a “restored” event, for Google they will be “purchases”.   When you get them, you just process them as if they were new, that is unlock whatever feature you need to unlock.

Rob

Rob Miracle, first of all thank you for your reply.

Second is, I already knew about the “purchase” return on google play, But from what I can see in your answer, are you telling me that I can check inside the   ‘elseif(tstate==“purchase”)    [ HERE  ]  else…’    part for soething like:

if(‘something’==“myProductID”) then

            --unlock product content here

end

Is that what you mean? If so what is that ‘something’ I should be able to compare against my product ID? Is it the json response?

If so and it may sound like a noob question can you give me an example of how would I do that with that response?

Thanks for your time

if transaction.productIdentifier == “com.yoursite.yourproduct” then

Thank you very much. I will check it later to see if everything is ok.

That small piece of code is probably all i needed.

Thanks again Rob, very appreciated.