Search Unity

[Solved] questions about google play payment process

Discussion in 'Unity IAP' started by Citrusjoy123, Jan 18, 2017.

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

    Citrusjoy123

    Joined:
    Jan 10, 2017
    Posts:
    7
    Is there any way for me to know what happened between the google play payment window shows and disappears? Like whether the user encounters some internet error, whether the user got a declined payment, etc.
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @Citrusjoy123

    When a purchase fails, the OnPurchaseFailed callback is triggered.
    https://docs.unity3d.com/Manual/UnityIAPHandlingPurchaseFailures.html

    The PurchaseFailureReason will give you more specific information about the purchase failure, if available:

    https://docs.unity3d.com/ScriptReference/Purchasing.PurchaseFailureReason.html
     
  3. Citrusjoy123

    Citrusjoy123

    Joined:
    Jan 10, 2017
    Posts:
    7
    I do use OnPurchaseFailed callback, and I do check PurchaseFailureReason, but no matter what happens during the payment process, I always get a "canceled reason", as least on the Google Play platform.
     
  4. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    So discussing this issue with our engineers, it seems the case may be that we are not able to get more information from Google Play.

    It appears what is most likely happening is that some error message is displayed with an OK button that will close the dialog box. When the user closes the dialog box, Google marks this as a "User Cancelled" event and that is what Unity IAP receives.

    There isn't much we can do on this end, since Unity IAP is just an API that can only use what the stores send us. This may be something you can contact Google about and see if you can suggest more transparency in the errors they report:
    https://support.google.com/googleplay/android-developer/?hl=en#topic=3450769&contact=1
     
Thread Status:
Not open for further replies.