Search Unity

duplicateTransaction when buying an item twice in Alpha APK

Discussion in 'Unity IAP' started by kk3hi3123, Nov 20, 2018.

  1. kk3hi3123

    kk3hi3123

    Joined:
    Aug 17, 2016
    Posts:
    31
    Hello. I have set up some consumable products in Google Play Console. And then I test codeless IAP in alpha testing version. I use my testing device so I can test the purchasing process without paying money. Everything seems okay until I buy an item again. The products which I have bought once return duplicateTransaction error. Cleaning the Google Play cache does not fix the bug. Any idea?

    Unity Version: 2018.2.14f1
    Unity IAP Version: 1.20.1

    Screenshot 2018-11-20 at 5.34.50 PM.png Screenshot 2018-11-20 at 5.38.40 PM.png
     
    Last edited: Nov 20, 2018
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Do you have the Consume Purchase checkbox set in the IAPButton properties?
     
  3. kk3hi3123

    kk3hi3123

    Joined:
    Aug 17, 2016
    Posts:
    31
    Yes, it is checked.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    I just tested here (in US) without issue using Codeless with 1.20.1 on my Android device and was immediately able to repurchase the same consumable product. I created a Codeless version of the Sample project here https://forum.unity.com/threads/sample-iap-project.529555/ and followed the testing steps here https://docs.unity3d.com/Manual/UnityIAPGoogleConfiguration.html If you continue to have problems, please post the device logs https://forum.unity.com/threads/how-to-capturing-device-logs-on-android.528680/
     
    Last edited: Nov 21, 2018