GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Google play IAP Question

muusimuusi Posts: 61Member, PRO

Hi,

I am trying to use consumable item in Google Play.

In the buy button

1st In App Purchase - Request Purchase Data
2nd In App Purchase - Buy Item
3rd I check with Text Expression that purchase table consumable item is purchased (row1, column 5 is "purchased")
4th I do to necessary things inside the game related to consumable item
5th In App Purchase - Consume Item

1st time everything is OK, but after this user gets the item again and again. It's like the value in Purchase table is all the time "purchased", like the behaviour In App Purchase - Consume Item doesn't work.

What am I doing wrong here?

My apps & games: Google Play | App Store | Amazon

Answers

  • ArmellineArmelline Posts: 4,771Member, PRO

    Do you definitely have "is purchased" rather than "contains purchased"? That's often a cause of repeated reward triggers.

  • muusimuusi Posts: 61Member, PRO

    Thanks @Armelline for your answer. Yes it's "is"

    My apps & games: Google Play | App Store | Amazon

  • ArmellineArmelline Posts: 4,771Member, PRO

    I'll need to see all the purchase logic then if we're to have any hope of pinning this down.

  • muusimuusi Posts: 61Member, PRO

    Thanks @Armelline

    I display the value of the PurchaseTable's 5th column and it is first unpurchased, then pending, and then purchased, but it never turns back to unpurchased what I think In App Purchase - Consume Item should do

    My apps & games: Google Play | App Store | Amazon

  • ArmellineArmelline Posts: 4,771Member, PRO

    That looks fairly straightforward, and should be working. If the add coins is triggering, the consume should be triggering too. The "pc" is typed directly into the box, not into the Expression Editor?

  • muusimuusi Posts: 61Member, PRO

    Add coins is triggering and "pc" is typed directly into the box, not into the Expression Editor. Double checked this.

    Just to test, I made a loop that fires the consume every 0.03 seconds until the PurchaseTable's 5th column would be "unpurchased". It never happens :(

    My apps & games: Google Play | App Store | Amazon

  • ArmellineArmelline Posts: 4,771Member, PRO
    edited April 8

    Next thing I'd do would be throw a display text or spawn into the timer along with the consume, and check that that timer is actually being run. Could still be lots of things though.

    I'd also try setting the timer to longer than 0.03, perhaps 0.1

  • muusimuusi Posts: 61Member, PRO

    Thanks for the tip @Armelline. Tried with display text and and different timer values. Display text fires right after the consume, but the State column in the PurchaseTable stays purchased.

    As you said this is fairly straightforward and should work. For some strange reason it doesn't. Only thing I can think of what is different for instance to your working IAP tutorial template (thank you for those BTW) is that I am using my own server

    which causes the PurchaseTable have this Type option

    compared to


    It shouldn't effect but here I am banging my head to the wall...

    My apps & games: Google Play | App Store | Amazon

  • muusimuusi Posts: 61Member, PRO
    edited April 10

    To clarify, all this happens in Android version (Google Alpha release).

    Everything else works: In App Purchase Request Purchase Data fetches the local prices, players can buy it with test purchases or with real money. 1st purchase is OK, but since the In App Purchase Consume Item doesn't chance the status to unpurchased players can't buy again.

    After spending hundreds of working hours to this game, I really hope that this is not a dead-end.

    My apps & games: Google Play | App Store | Amazon

  • ArmellineArmelline Posts: 4,771Member, PRO

    Do you definitely have the banking info and contacts all filled out correctly?

  • muusimuusi Posts: 61Member, PRO

    yes, banking and contacts are filled correctly. I "fixed" this with quite ugly hack: I changed the consumable item to non-consumable, but it appears to user as consumable. i.e. user can buy the item endlessly it just uses always a new non-consumable item.

    My apps & games: Google Play | App Store | Amazon

  • muusimuusi Posts: 61Member, PRO

    Still struggling with this issue. I found out that I needed a consumable IAP in my game after all and that I couldn't use the previous hack.

    Lots of trial and error (about a weeks worth of work now) but no results. Utterly frustrating :(

    Found some differences to @Armelline 's IAP tutorial template. If I open the IAP template's PurchaseTable xml-file consumables are marked True or False, but current GS uses 0 or 1.

    Also current GS writes Name, Price and State columns with readonly state 1 in the xml-file.

    I don't know if these are causing the consumable issues...
    @adent42 could you please comment/look at this?

    My apps & games: Google Play | App Store | Amazon

Sign In or Register to comment.