Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Closed] IAP: Specifically "consumables" on Android

Discussion in 'Unity IAP' started by CrisV, Oct 4, 2016.

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

    CrisV

    Joined:
    May 30, 2014
    Posts:
    8
    I have setup IAP following the guides online, intended for use both on Android and iOS platforms. I only have a single consumable item, which I have setup on both stores. On iOS I am using External testing and it is working like a charm. I can make multiple purchases of the item using the same iTunes (or whatever it's called..) user but on my Android build, which I have set up as an Alpha testing build (of which I added a handful of Emails) I am able to make the initial purchase but thereafter the same user cannot make more purchases as the store says the product was already purchased.

    I thought maybe there was some extra calls needed to ensure a consumable item is 'consumed' so further purchases can be made, but it doesn't explain why it is working as intended on iOS (apart from I can actually specify the IAP as a consumable on iTunes Connect), nor can I seem to find any information of how I could do this. I am still under the impression the skeleton example code - which is extremely close to the Purchaser file I made/copied - will also sort out consumption of consumables.

    Is there anything specific that must be done for the Android platform in order to get consumables working as intended? I won't drop the classic "halp we have to release soon!"... but halp we have to release soon :)


    I should mention that I seem to be using IAP version 1.8.1, with Unity 5.4.1 and that purchase attempts done on the Android device has mostly been trying with redeem codes as opposed to credit card, not sure if that's the issue..?
     
    Last edited: Oct 4, 2016
  2. CrisV

    CrisV

    Joined:
    May 30, 2014
    Posts:
    8
    Back with an update:

    I tried some more testing today but on a different google user and this time without messing with redeem codes, purely good old credit card transactions and it seems to work as expected. Perhaps this is just a conflict with using GooglePlay redeem codes during Alpha testing. The panic has lessened.
     
    ap-unity likes this.
  3. jacagugle

    jacagugle

    Joined:
    Mar 12, 2015
    Posts:
    16
    Did you use something like redeem codes on iOS too, or you tested iOS using credit card? I'm just curious, it seems like a important thing to notice.
     
    ap-unity likes this.
  4. CrisV

    CrisV

    Joined:
    May 30, 2014
    Posts:
    8
    Nah for iOS I added testers through the External Testing on iTunesConnect, which then uses user's iTunes account. I think it uses the one that is set as default on the device and if there isn't anything set yet it will ask you to login or create an iTunes user before you can proceed with the (fake) purchase. If the account matches the mail that was added for testing then it just works - no prompts for credit card or redeem codes.
     
    jacagugle likes this.
  5. peakto

    peakto

    Joined:
    Jun 2, 2013
    Posts:
    6

    i also got the same error. and i test my game by purchasing an iap with redeem code on googleplay,and then i cannot purchase the same iap item any more,and i got the message : the item have been purchased.
     
  6. CrisV

    CrisV

    Joined:
    May 30, 2014
    Posts:
    8
    Yeah that sounds like what was happening for me. I think it's an issue with redeem codes specifically, give it a try with a credit card and it should work. You have to use correct credit card information but it will show a message saying that you won't be charged for the purchase. Our app isn't live yet on GooglePlay but all testing I did after where I used a credit card seemed to work so I'm assuming it will be fine when it's live, also with codes.
     
  7. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Hi @CrisV and @peakto

    We are looking into this issue. Thanks for bringing it to our attention!
     
  8. gurttt

    gurttt

    Joined:
    Jun 14, 2015
    Posts:
    6
    @ap-unity I am having this same problem. I thought the issue was just with Non-Consumables, but it is also happening with Consumable items. Right now I am only testing my Consumable item on Google Play. I have looked at and followed the code examples and I am unable to purchase my consumable more than once.
    I am using Unity IAP V 1.8.3 and Unity v 5.4.2f2
     
  9. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @gurttt,

    Are you also using redeem codes? Does it work as expected when using a credit card?
     
  10. gurttt

    gurttt

    Joined:
    Jun 14, 2015
    Posts:
    6
    Hi @erika_d ,

    No I am not using redeem codes. I am using closed alpha testing so I get a receipt but it doesn't actually charge me.
     
  11. erika_d

    erika_d

    Joined:
    Jan 20, 2016
    Posts:
    413
    Hi @gurttt,

    I'll make sure the IAP devs are aware this issue is happening without redeem codes as well. What is the actual error message you're getting? Is it the This item has already been purchased one? If you're still having this issue can you post your stack trace and/or ADB logs? Perhaps the consumable isn't being properly consumed on the first purchase...The ADB logs should help determine that.
     
  12. gurttt

    gurttt

    Joined:
    Jun 14, 2015
    Posts:
    6
    Hi @erika_d,

    I will update my issues/logs here as soon as I can. Thanks.
     
    erika_d likes this.
Thread Status:
Not open for further replies.