Search Unity

Unable to retest IAP process on same device with codeless IAP

Discussion in 'Unity IAP' started by davejas, Dec 14, 2018.

  1. davejas

    davejas

    Joined:
    Apr 12, 2017
    Posts:
    5
    I have a simple implementation of codeless IAP for iOS set up and it works successfully on my test device
    but once I purchase with my sandbox account, I can no longer test additional times.

    The next time I try to test the in app purchase, it seems to call the purchase complete method without doing anything. I have even deleted the app from the device and reinstalled.

    I can reinstall on an additional test device to test it again, but there should be a way to reset your device after a test purchase.

    Attaching my IAP button, Catalog and the script that handles the purchase...

    iapButton.png iapCat.png iapCode.png
     
  2. GreeneMachine

    GreeneMachine

    Joined:
    Jul 3, 2015
    Posts:
    126
    Try this:

    > In IAP Catalogue, change item in question to "Consumable"
    > On IAPButton component, enable "Consume Purchase"
    > Build

    > Delete data/cache for app on device
    > Launch app and make purchase.
    > Relaunch

    EDIT: As per JeffD's comment below... It sounds like this will make your item a Consumable... which might be more suitable for repeat testing. But I guess this would not be usable for testing Restores.... You may need a Non Consumable for that. Using a consumable does seem to allow you repeat test purchases using one account and item though

    Give it a try anyway, its not ideal, but it should do the trick
     
    Last edited: Dec 14, 2018
    davejas likes this.
  3. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    As mentioned, a non-consumable can only be purchased once, even during testing. Otherwise you'll need another tester or another product.
     
    davejas and GreeneMachine like this.