Search Unity

Server Side Receipt Validation at Google Play Store

Discussion in 'Unity IAP' started by kzymgch_ss, Jun 11, 2019.

  1. kzymgch_ss

    kzymgch_ss

    Joined:
    Jul 27, 2018
    Posts:
    1
    I'm developing an application for Android in Unity in which I want to use IAP.

    Before a purchase confirmation I want to contact my server and make some check.

    With UnityWebRequest, I'm making the POST to my server, waiting for the response and to suspend the purchase process I'm returning the Pending value.

    My problem here is that even if my process is in pending status (PurchaseProcessingResult.Pending) and the error thrown by the Post, the purchase seems to be processed as Complete since I receive an email from Google Play Store in which is written I purchased the item.

    If there is an error returned from the server, is there any way to make it pending and not buy item and not receive an email from Google?

    Can someone help me, please?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446