IOS Store.restore() Odd behavior

I have seen some very strange behavior when testing my in-app-purchases. I wanted to test the restore functionality. So, I purchased a subscription (7days) in my test app and immediately deleted and added back the app. When I do this, the app has no idea that the user is a subscriber. I then hit restore and expect to get my messages but one of which is my previous purchase. It wouldn’t work on a test user that had many in-app-purchases. So, I figured it was my code and I might have missed the transaction Id in the XCode Organizer console window. I then created a new test user and tried the same process again. It was the test user’s first purchase and first restore attempt. It worked, it restored the subscription. I couldn’t get it to work properly again. I then began examining the data that is being returned from the app store. I would see the following data elements returned: Original Id, Original Date, productId, transactionId and date. I found that the “Original Id” corresponded to my original purchase Id but the Transactionid and Date were beyond my latest transactionId. It looked as if though it was returning the most recent transaction id on the entire system, regardless of the Application. This seems strange but the transactionId, which is normally a really large integer, was increased by 40 and the purchase times were almost real-time. Has anybody else experienced this strange behavior?

thanks,
Rob [import]uid: 38348 topic_id: 35897 reply_id: 335897[/import]

Hmm, store.restore() has suddenly stopped working for me, in both the latest public build 970 and daily build 1030. It just hangs, my callback function is never called. This is code that was previously working in all my apps.

[import]uid: 93133 topic_id: 35897 reply_id: 143232[/import]

That is odd. I’m getting some pretty strange message data returned when I call store.restore(). However, I am getting a response from my calls. Do you have apps on the AppStore or Google play that don’t work or are you talking just development? [import]uid: 38348 topic_id: 35897 reply_id: 143267[/import]

Hi,

I have the same problem. Kindly, do let us know how you would have solved the issue.

Thanks.
[import]uid: 69970 topic_id: 35897 reply_id: 143439[/import]

Wow, I actually received a response from Google play and was able to simulate a purchase… it failed with some pcall_ error:
“02-20 20:53:20.124: I/Corona(19637): Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?:0: attempt to concatenate a table value”

I’m happy it responded, though. Here is what I did from the beginning. I have a Google Play developer membership (paid the $25). I signed into the Developer Console and added a new application under the “All Applications” section. I added in-app-purchase items (which in retrospect wasn’t necessary). I then went to the settings page and added my email address that my phone is using… which is my normal email address for all of my google accounts. In my app, I sent a call to google with the product id of “android.test.purchased” as well as “android.test.canceled”. When I sent that data up on my device (not emulator) I received a response. I was doing the same thing last night but I found a bug in my code that was not calling store.init(“google”, callbackMethodName). You must call store.init(… first and then call store.purchase({productid}) and have your event states in your callback method or function.

I think the error has to do with the fact that I’m printing a lot of info to the console (which worked with the Apple response). I’ll have to do some reasearch to see what is or isn’t allowed to be checked via event.transaction…

I hope this helps for Android in-app-purchase testing. Oh, I’m also looking at the print statements vai ddms, found under the android-sdk/tools folder. I’m not using eclipse.

Cheers,
Rob [import]uid: 38348 topic_id: 35897 reply_id: 143531[/import]

quick update… I found a bug inside my callback method: print("Event.productId: " … event…productIdentifier) which is probably the problem.

[import]uid: 38348 topic_id: 35897 reply_id: 143532[/import]

Thanks, this will really help us. [import]uid: 69970 topic_id: 35897 reply_id: 143848[/import]

Hmm, store.restore() has suddenly stopped working for me, in both the latest public build 970 and daily build 1030. It just hangs, my callback function is never called. This is code that was previously working in all my apps.

[import]uid: 93133 topic_id: 35897 reply_id: 143232[/import]

That is odd. I’m getting some pretty strange message data returned when I call store.restore(). However, I am getting a response from my calls. Do you have apps on the AppStore or Google play that don’t work or are you talking just development? [import]uid: 38348 topic_id: 35897 reply_id: 143267[/import]

Hi,

I have the same problem. Kindly, do let us know how you would have solved the issue.

Thanks.
[import]uid: 69970 topic_id: 35897 reply_id: 143439[/import]

Wow, I actually received a response from Google play and was able to simulate a purchase… it failed with some pcall_ error:
“02-20 20:53:20.124: I/Corona(19637): Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?:0: attempt to concatenate a table value”

I’m happy it responded, though. Here is what I did from the beginning. I have a Google Play developer membership (paid the $25). I signed into the Developer Console and added a new application under the “All Applications” section. I added in-app-purchase items (which in retrospect wasn’t necessary). I then went to the settings page and added my email address that my phone is using… which is my normal email address for all of my google accounts. In my app, I sent a call to google with the product id of “android.test.purchased” as well as “android.test.canceled”. When I sent that data up on my device (not emulator) I received a response. I was doing the same thing last night but I found a bug in my code that was not calling store.init(“google”, callbackMethodName). You must call store.init(… first and then call store.purchase({productid}) and have your event states in your callback method or function.

I think the error has to do with the fact that I’m printing a lot of info to the console (which worked with the Apple response). I’ll have to do some reasearch to see what is or isn’t allowed to be checked via event.transaction…

I hope this helps for Android in-app-purchase testing. Oh, I’m also looking at the print statements vai ddms, found under the android-sdk/tools folder. I’m not using eclipse.

Cheers,
Rob [import]uid: 38348 topic_id: 35897 reply_id: 143531[/import]

quick update… I found a bug inside my callback method: print("Event.productId: " … event…productIdentifier) which is probably the problem.

[import]uid: 38348 topic_id: 35897 reply_id: 143532[/import]

You have found a solution to this problem or not? I ran into her on the ios 6 devices. Can you tell me what is the advice? [import]uid: 212732 topic_id: 35897 reply_id: 144650[/import]

Thanks, this will really help us. [import]uid: 69970 topic_id: 35897 reply_id: 143848[/import]

You have found a solution to this problem or not? I ran into her on the ios 6 devices. Can you tell me what is the advice? [import]uid: 212732 topic_id: 35897 reply_id: 144650[/import]

Hmm, store.restore() has suddenly stopped working for me, in both the latest public build 970 and daily build 1030. It just hangs, my callback function is never called. This is code that was previously working in all my apps.

[import]uid: 93133 topic_id: 35897 reply_id: 143232[/import]

That is odd. I’m getting some pretty strange message data returned when I call store.restore(). However, I am getting a response from my calls. Do you have apps on the AppStore or Google play that don’t work or are you talking just development? [import]uid: 38348 topic_id: 35897 reply_id: 143267[/import]

Hi,

I have the same problem. Kindly, do let us know how you would have solved the issue.

Thanks.
[import]uid: 69970 topic_id: 35897 reply_id: 143439[/import]

Wow, I actually received a response from Google play and was able to simulate a purchase… it failed with some pcall_ error:
“02-20 20:53:20.124: I/Corona(19637): Lua Runtime Error: lua_pcall failed with status: 2, error message is: ?:0: attempt to concatenate a table value”

I’m happy it responded, though. Here is what I did from the beginning. I have a Google Play developer membership (paid the $25). I signed into the Developer Console and added a new application under the “All Applications” section. I added in-app-purchase items (which in retrospect wasn’t necessary). I then went to the settings page and added my email address that my phone is using… which is my normal email address for all of my google accounts. In my app, I sent a call to google with the product id of “android.test.purchased” as well as “android.test.canceled”. When I sent that data up on my device (not emulator) I received a response. I was doing the same thing last night but I found a bug in my code that was not calling store.init(“google”, callbackMethodName). You must call store.init(… first and then call store.purchase({productid}) and have your event states in your callback method or function.

I think the error has to do with the fact that I’m printing a lot of info to the console (which worked with the Apple response). I’ll have to do some reasearch to see what is or isn’t allowed to be checked via event.transaction…

I hope this helps for Android in-app-purchase testing. Oh, I’m also looking at the print statements vai ddms, found under the android-sdk/tools folder. I’m not using eclipse.

Cheers,
Rob [import]uid: 38348 topic_id: 35897 reply_id: 143531[/import]

quick update… I found a bug inside my callback method: print("Event.productId: " … event…productIdentifier) which is probably the problem.

[import]uid: 38348 topic_id: 35897 reply_id: 143532[/import]