IAPP purchase set up - sandbox testing - Purchase worked but boolean switch not changing!

IcedBIcedB Member, PRO Posts: 384
edited September 2012 in Working with GS (Mac)
Hey guys,
I'm trying to sandbox test my new in app purchase but I am having problems getting it to turn my boolean switch to true when the test purchase occurs.
The correct purchase name pops up (so the GS function and product ID are fine).
So I login using the test user account and it states that it is in sandbox mode.
It then says "You've already purchased this, tap ok to download again for free"
So i tap ok and it says...."The in app purchase could not be completed at this time. Please try again later"

My itunes connect settings are :
Non-consumable
Cleared for sale : Yes
Hosting is turned to off - I have no content...

I'm simply trying to get the boolean switch to turn to true upon making the IAPP purchase in test mode so that it unlocks some new features. I didn't want to submit until i knew for certain the functionality is correct.

Can anyone help me with this. I've read all the tutorials on both apple and gamesalad sites and can't figure out why the IAPP test is not working


Comments

  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Hey,

    how does your iAP rule look like?

    Alex
  • IcedBIcedB Member, PRO Posts: 384
    image

    I think the iAP rule is fine. I have a secondary testing (manual override) button that on press triggers the boolean switch, that I put in place to make sure there are absolutely no breaks in the logic....
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    Are you sure that the Boolean isn't on? I would display the attribute and then see what happens when you purchase it. From the rule it all seems to be correct...
  • IcedBIcedB Member, PRO Posts: 384
    Yes, I'm dead certain that the boolean is always set off in its rest state. The override button (not Iapp) that i created displays the status of the boolean as false. When the override button is pressed it switches the attribute to true, so the attribute is definitely functioning correctly. I'm using 0.0.94 and I presume that version has no bugs in IAP?
  • GuaveMediaGuaveMedia Member, PRO Posts: 1,262
    I also went pro for some weeks and worked a lot with iAP, but I only had consumable ones, they are working fine.

    I will make a quick project and try if I get the same error as you okay..
  • IcedBIcedB Member, PRO Posts: 384
    Will check the email now. Just to clear up any potential confusion.
    When testing the app in the viewer and I click the Iapp button and then press "Success" the attribute is triggered. It appears to just not work when sandboxing in the ad hoc build
  • IcedBIcedB Member, PRO Posts: 384
    Hey, you're project is set up exactly the same way as mine is apart from the consumable part but switching consumable off still makes it function the same way. I may record a video to explain what seems to be going wrong
  • IcedBIcedB Member, PRO Posts: 384
    QUOTE"

    LycetteBros
    August 8th
    I have not had an In-App or Restore ever work on an Ad-Hoc build using sandbox. When I hit the button(s) I am asked to login to my sandbox account and it attempts to connect to the iTunes account. It fails at this point. However this has meant that it will work when published - if it at least leaves your app and tries to connect to iTunes I'd see that as a success.

    BTW Make sure you are properly logged out of any accounts in iTunes and Gamecenter before logging into the test account. I always log into my sandbox (test) account in iTunes first before testing an AdHoc build.
    Hope this helps...it has never been super clear to me either!

    "

    Looks like the IAP test it isn't meant to work completely and shouldn't switch the boolean in the sandbox mode. I really wish gamesalad could have pointed this out in the documentation!
  • IcedBIcedB Member, PRO Posts: 384
    edited September 2012
    Heres' the video showing what happens when I try to run the IAP test:

  • ecscessecscess Member Posts: 23
    I also had this problem for about a month and I kept asking around, but nobody knew how to help. The cookbook didn't provide any answer either. The solution is to setup a success scene. Apparently, if the scene doesn't change, the attribute will not be saved, so, make a thank you or success scene and set it to in-app purchase item attribute.
  • TechNoirTechNoir Member, PRO Posts: 117
    This looks like you have everything set up correctly.. I found while testing with adhoc, IAP testing can be tricky.. Why do you have your non consumable item drawing from a table? As it is just a boolean I would take it out and place the Product ID in "quotes"

    Is it also something do to with your game center login on your iphone,, who are you logged in as? Is it your test account or not?
  • IcedBIcedB Member, PRO Posts: 384
    @escess its not ideal to have to switch to a success scene because it will affect the current state of attributes in actors when the scene is rebooted. I will however try this to see if it does trigger the attribute

    @Technoir the product id is obviously working though because it is pulling the correct IAP description from apple, so i didn't see much point altering this but I can try it. I'm logged in as my test account but I did the login by signing out then signing in whilst doing an IAP.
  • cshmerlinggmailcomcshmerlinggmailcom Member Posts: 2
    edited September 2012
  • ShmirlyWhirlShmirlyWhirl Member Posts: 189
    I had this problem with my first game I uploaded about a month ago. In sandbox, I had the exact same problem you were. However, I went ahead and uploaded it, and it works just fine on the store.

    My suggestion is that if it looks like it should be working, it probably will when its live.
  • IcedBIcedB Member, PRO Posts: 384
    @ShmirlyWhirl Yeah I was going to go for the gamble after someone else said the same as you. I've tried both escess's idea to change scenes (but that won't work because the test IAP isn't submitting) and putting it in brackets instead of a table has the same results....
  • ShmirlyWhirlShmirlyWhirl Member Posts: 189
    From my experience, having the attribute controlled by a table is pretty hit or miss. I always set it up change be a global attribute, and then if need be assign it to a table from there.

    But even then, I've never used brackets or quotes or anything like that, so I don't know about @TechNior's method.

    Though if you're getting the call to Apple's server, it would appear everything is set up correctly.
Sign In or Register to comment.