Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

botched iap preventing any more iap?
Started by ventrice.tony Aug 30 2018 09:38 AM

3 replies to this topic
iap
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

ventrice.tony

[GLOBAL: userInfoPane.html]
ventrice.tony
  • Observer

  • 4 posts
  • Corona SDK

I'm finishing up a sequel to an earlier game I developed. The new game builds on the code of the earlier game. The earlier game had consumable in app purchases, but in the new game I want both consumable and one-time purchases.

 

My game has two scenes, the main menu scene and the game scene and they are in two different lua files.

 

I copied the functionality of the consumable purchases in the game scene and everything worked fine. I tested purchases and they worked.

 

I then added code to the main menu scene to handle purchases there (for my new one-time purchase). I had to make a few tweaks and I accidentally left out the call to store.loadproducts.

 

When I tested, I got the prompt to purchase the item (which is strange, considering I never loadedproducts). I confirmed the purchase but, back in my game, it acted as if it never got confirmation and I did not unlock the in-game content. When I check Order Management in the Google Play console, there is no record of the purchase.

 

I then added the call to store.loadproducts in my code but now I seem to have a new problem. With this test account, in this game, I can not make any in-app purchases. The purchase request is made but the google play store does not respond and no prompt is presented to the user. This is true even for the iap inside the game scene, which had previously worked.

 

It seems as if the incomplete transaction is blocking any further transactions.

 

Is this possible and is there any way to clear the problem? 



[TOPIC: post.html]
#2

ventrice.tony

[GLOBAL: userInfoPane.html]
ventrice.tony
  • Observer

  • 4 posts
  • Corona SDK

I think there were a few things conspiring to create this situation. The primary issue was the purchases need to be consumed, in order to test them again. The easiest way to handle this was to just create a 'consume' button so I could manage resetting it manually.

Another issue is I should have been using "android.test.purchased" until I was certain I had the redemption side working.

A third issue is that the Google Order Management page was not updating when I refreshed the page. I'm not sure if I got it to refresh or if it just did it on its own, but two days worth of purchases had been not showing up.



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

I'm glad you made progress on this. These are the kinds of problems there are not easy to diagnose and offer solutions too.

 

Rob



[TOPIC: post.html]
#4

ventrice.tony

[GLOBAL: userInfoPane.html]
ventrice.tony
  • Observer

  • 4 posts
  • Corona SDK

I was also defining storeTransaction in both scenes which seems to be a problem.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: iap