Search Unity

[Solved] IAP Clearing non consumable test purchase Google Play

Discussion in 'Unity IAP' started by Berno, Aug 5, 2016.

Thread Status:
Not open for further replies.
  1. Berno

    Berno

    Joined:
    Oct 29, 2014
    Posts:
    25
    Hello,

    Previously I could remove a test purchase by logging onto my merchant account and cancelling the purchase. Then clearing google plays cache to clear the local cache.

    Now google has changed the way test purchases work I cannot find an answer on how to do this anywhere?
    Somewhere I read the test purchases are removed after 14 days however its been longer than this and my receipts are still present after clearing the store cache?

    Anyone know?
    Thanks
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,610
    I thought I saw somewhere it was 30 days... not sure though. You can still do the whole merchant account purchase cancelling part.
     
  3. Berno

    Berno

    Joined:
    Oct 29, 2014
    Posts:
    25
    Unfortunately since June 20 you cant cancel test purchases because they don't get that far anymore.
    I have found the discussion I was looking for:
    http://stackoverflow.com/questions/...le-play-iab-test-purchases-after-june-20-2016

    Unfortunately the code provided to consume a purchase wont help me in Unity.
    Any way in Unity IAP to force it to consume a non consumable?
    Why did google change this? :(
     
  4. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    321
    Hi @Berno,

    The workaround we're suggesting right now is once you've made your test purchase and are ready to consume the product, change the product declaration to consumable, run it once with that declaration in order to consume it, than you can change it back to non-consumable for future testing...
     
    DwinTeimlon likes this.
  5. gurttt

    gurttt

    Joined:
    Jun 14, 2015
    Posts:
    6
    Hi @erika_d ,
    Do you mean to change the code to:
    builder.AddProduct(productIDConsumable, ProductType.Consumable);​
    Consumable from NonConsumable?

    I am having this issue as well, where I tested my non-consumable item but now I can't test it again because I cannot cancel the purchase.

    Thanks for your help
     
  6. Berno

    Berno

    Joined:
    Oct 29, 2014
    Posts:
    25
    I have to admit it didn't work for me either.
    I just left it for a while to see if it would ever come through but it didn't.
    Now that I'm getting close to release I see no other way to test other than creating multiple gmail accounts and testing with them.
     
  7. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    321
    HI @gurttt,

    Yes that's exactly what I mean. That should consume it and clear it out on app launch, or if app launch doesn't work you might need to run through a purchase of it. But after that you should be able to change it back to non consumable to test again.

    @Berno,

    Which didn't work for you? Testing non consumables or temporarily changing non consumables to consumable?
     
  8. gurttt

    gurttt

    Joined:
    Jun 14, 2015
    Posts:
    6
  9. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    321
    Thanks for posting on that other thread. We'll post there when we know more about the redeem codes issue!
     
  10. gurttt

    gurttt

    Joined:
    Jun 14, 2015
    Posts:
    6
    Just to clarify, I am not using redeem codes. Also I am using closed alpha testing.
     
  11. Berno

    Berno

    Joined:
    Oct 29, 2014
    Posts:
    25
    Changing to consumable and just running the initialise code didn't work for me.
    However I modified my code to allow me to repurchase the same item as a consumable and this has now worked and cleared the receipt.

    Thank you!
     
    erika_d likes this.
Thread Status:
Not open for further replies.
unityunity