IAP issue.. Purchase does not complete.

sinbotsinbot Member Posts: 232

"The activity indicator spun indefinitely when we attempted the buy the in-app purchase product."

Can anyone see why this may be occurring? This is inside the PURCHASE button...

And this is inside an actor in the same scene...


Comments

  • ArmellineArmelline Member, PRO Posts: 5,353

    The second rule seems to say "Test Expression game.PurchaseTable contains Purchased" - that's not a valid table reference, and if you use "contained" rather than "is" it will trigger for unpurchased too as the word unpurchased contains purchased. You also do need to save the PurchaseTable, it is pulled each time the game loads when "Request Purchase Data" is triggered.

  • solnikasolnika Member Posts: 132

    sorry for jumping here, @Armelline we need to save the purchaseTable or it will load with the data when the "request purchase data" is called?

  • ArmellineArmelline Member, PRO Posts: 5,353

    You also do need to save the PurchaseTable, it is pulled each time the game loads when "Request Purchase Data" is triggered.

    This should read "You also do not need to save..."

    Important word missed there :D

  • solnikasolnika Member Posts: 132

    Thanks @Armelline


    May I ask another question you might be able to answer, does the "request purchase data" still call the login popup, or is it safe to put it at the start of the game?

  • sinbotsinbot Member Posts: 232

    Thank you. I'll make those fixes.

    I'm also wondering what is supposed to be in the callback attribute? In the cookbook it says "self.Callback" but when I typed that in I noticed it doesn't save and just clears blank.

  • ArmellineArmelline Member, PRO Posts: 5,353

    The callback attribute should just be any attribute you make that you use to store the response from the server. If it's -1 it can't connect and IAPs won't be able to be processed. If you get back -1 you should keep trying it and inform the user that there is a connection error. If it's 1, you can proceed with letting them make a purchase. You don't need to save it - it needs to be checked every session anyway.

    Request Purchase Data can call the popup still, as far as I'm aware, but it doesn't always do so. I would not recommend putting it at the start of the game anyway - there's literally no point even calling it unless the player specifically navigates to the IAP screen. Call it either then or (my preference) when they actually press the Buy or Restore button.

  • solnikasolnika Member Posts: 132

    Thanks, I will need to think how to do it as I only want remove ads with a one click button, I don't have IAP screen.

    I was under the impression they fix the login popup when "Request Purchase Data" calls...

    @adent42 maybe you can help on this?

  • ArmellineArmelline Member, PRO Posts: 5,353

    Just trigger the request purchase data when they press the button then.

  • sinbotsinbot Member Posts: 232

    Ok, I think I understand this now.

    Lastly, do I need to list the Purchase table STATE as "Unpurchased"? Or should STATE just be left blank to auto-fill?

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,155

    @sinbot it will autofill when you request purchase data.

  • sinbotsinbot Member Posts: 232

    Thank you. Sandbox testing works. Hopefully Apple approves now.

Sign In or Register to comment.