In-App Purchase Table-- After a purchase is completed the table goes back to "unpurchased?"

iKandyiKandy Imagineer of Crazy ShitNew York CityMember Posts: 310

Why does this happen?

You click on the IAP purchase button-- table value column 5 says "purchased" -- then it goes back to "unpurchased."
What am I doing wrong?

Comments

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    Is it a consumable iAP?

  • iKandyiKandy Imagineer of Crazy Shit New York CityMember Posts: 310

    non-consumable

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    It's supposed to go back to unpurchased. See my video on the IAP a system.

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    @iKandy

    Say you have an in-app purchase called "removeAds." You will want to make a boolean attribute called removeAds.

    After the value of the column of the purchase table changes to "purchased," you will want to change the removeAds attribute to true.

                When text expression
    

    tablecellvalue(game.purchasetable,1,5) is purchased

    Change attribute removeAds to true

    ---Save the removeAds attribute via a table or save attribute behavior.

    ---For the attribute to work in your game you will have to make a rule that says,

    If

    removeAds is true

    " "

    otherwise,

    Show Banner

  • iKandyiKandy Imagineer of Crazy Shit New York CityMember Posts: 310

    Yes, RabidParrot... I did all that and it worked well the first time. However, when I make another adhoc build of the game and test it, the message from Apple says "you already bought this item...you can get it again for free blah blah blah" and when I press OK.. the game doesn't save the attribute boolean behavior and the table state says "unpurchased."

  • RabidParrotRabidParrot Formally RabidParrot. Member Posts: 956

    @iKandy

    How are you saving the boolean attribute? If you are making another adhoc build you will need a restore purchases behavior button.

  • iKandyiKandy Imagineer of Crazy Shit New York CityMember Posts: 310

    I'm saving the attribute "game unlock" (boolean "true") and loading it back in at reset.

  • iKandyiKandy Imagineer of Crazy Shit New York CityMember Posts: 310

    the callback to Apple continually changes from 0 to 1 and the table cel value continually changes from "purchased" "pending" "unpurchased." over and over.

Sign In or Register to comment.