Search Unity

User's purchase success, but OnPurchaseFailed() is called

Discussion in 'Unity IAP' started by grezodz, Apr 15, 2021.

  1. grezodz

    grezodz

    Joined:
    Mar 25, 2016
    Posts:
    7


    unity ver 2019.2.0f1
    IAP ver 2.2.7

    i use google test account to test IAP
    but there has a problem
    google shows payment success
    but my script Purchaser.cs call OnPurchaseFailed
    how can i fix this issue
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  3. grezodz

    grezodz

    Joined:
    Mar 25, 2016
    Posts:
    7
    clear
     
    Last edited: Apr 15, 2021
  4. grezodz

    grezodz

    Joined:
    Mar 25, 2016
    Posts:
    7
    Last edited: Apr 15, 2021
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  6. grezodz

    grezodz

    Joined:
    Mar 25, 2016
    Posts:
    7
    hi
    this is my logcat
    and i not found any error at hole purchase process
    and i compare the code with ur sample
    its basicly same process from init to purchase


    Purchasing product asychronously: 'com.grezod.tunner.diluteenergy1'

    04-16 11:27:31.959 7693 7712 I Unity : CompleteProject.Purchaser:BuyProductID(String)

    04-16 11:27:31.959 7693 7712 I Unity : UnityEngine.Events.UnityAction:Invoke()

    04-16 11:27:31.959 7693 7712 I Unity : UnityEngine.Events.UnityEvent:Invoke()

    04-16 11:27:31.959 7693 7712 I Unity : UnityEngine.EventSystems.EventFunction`1:Invoke(T1, BaseEventData)

    04-16 11:27:31.959 7693 7712 I Unity : UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)

    04-16 11:27:31.959 7693 7712 I Unity : UnityEngine.EventSystems.StandaloneInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    04-16 11:27:31.959 7693 7712 I Unity : UnityEngine.EventSystems.StandaloneInputModule:processTouchEvents()

    04-16 11:27:31.959 7693 7712 I Unity : UnityEngine.EventSystems.StandaloneInputModule:process()

    04-16 11:27:31.959 7693 7712 I Unity :

    04-16 11:27:31.959 7693 7712 I Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

    04-16 11:27:31.959 7693 7712 I Unity :

    04-16 11:27:31.984 7693 7712 I Unity : purchase({0}): com.grezod.tunner.diluteenergy1

    04-16 11:27:31.984 7693 7712 I Unity : UnityEngine.Events.UnityAction:Invoke()

    04-16 11:27:31.984 7693 7712 I Unity : UnityEngine.Events.UnityEvent:Invoke()

    04-16 11:27:31.984 7693 7712 I Unity : UnityEngine.EventSystems.EventFunction`1:Invoke(T1, BaseEventData)

    04-16 11:27:31.984 7693 7712 I Unity : UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)

    04-16 11:27:31.984 7693 7712 I Unity : UnityEngine.EventSystems.StandaloneInputModule:processTouchPress(PointerEventData, Boolean, Boolean)

    04-16 11:27:31.984 7693 7712 I Unity : UnityEngine.EventSystems.StandaloneInputModule:processTouchEvents()

    04-16 11:27:31.984 7693 7712 I Unity : UnityEngine.EventSystems.StandaloneInputModule:process()

    04-16 11:27:31.984 7693 7712 I Unity :

    04-16 11:27:31.984 7693 7712 I Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

    04-16 11:27:31.984 7693 7712 I Unity :

    04-16 11:27:32.156 3507 5587 D InputDispatcher: Focus left window: Window{34ef496 u0 com.grezod.tunner/com.unity3d.player.UnityPlayerActivity}

    04-16 11:27:56.719 3507 6243 D InputDispatcher: Focus entered window: Window{34ef496 u0 com.grezod.tunner/com.unity3d.player.UnityPlayerActivity}

    04-16 11:27:56.823 7693 7712 I Unity : onPurchaseFailedEvent({0}): com.grezod.tunner.diluteenergy1

    04-16 11:27:56.823 7693 7712 I Unity : UnityEngine.Purchasing.PurchasingManager:OnPurchaseFailed(PurchaseFailureDescription)

    04-16 11:27:56.823 7693 7712 I Unity : System.Action:Invoke()

    04-16 11:27:56.823 7693 7712 I Unity : UnityEngine.Purchasing.Extension.UnityUtil:Update()

    04-16 11:27:56.823 7693 7712 I Unity :

    04-16 11:27:56.823 7693 7712 I Unity : (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

    04-16 11:27:56.823 7693 7712 I Unity :

    04-16 11:27:56.896 7693 7712 W Unity : The character used for Underline and Strikethrough is not available in font asset [GenJyuuGothicX-Light SDF].
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @grezodz Please don't post logs inline, just attach the file. That is not the whole log, it's missing the initialization and product logs that I'm looking for. Please share the code you are using (please use Code tags)