Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

IAP analytics and server-side receipt validation

Discussion in 'Unity Analytics' started by PNordlund, Jun 11, 2018.

  1. PNordlund

    PNordlund

    Joined:
    Nov 20, 2013
    Posts:
    43
    We are using Unity In-App Purchasing and it's enabled in the project. We are doing receipt validation on the server so we haven't entered Google Public Key in the IAP settings in the Unity editor.

    When I go the analytics dashboard and hit "IAP Purchase Report" I get a dialog "Let's enable Unity IAP (In-App Purchasing) for your project" and can't go no further. What I'm doing wrong?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,613
    You may have one user who inadvertently disabled IAP/Analytics (or didn't have access permission). On your system, go into the Unity Editor and temporarily disable IAP and Save and exit Unity. Reopen Unity, and enable IAP again. This should toggle this setting in the Dashboard.
     
  3. PNordlund

    PNordlund

    Joined:
    Nov 20, 2013
    Posts:
    43
    Thanks, it worked!
     
  4. MatthieuPr

    MatthieuPr

    Joined:
    May 4, 2017
    Posts:
    39
    Hey JeffD,

    We got the analytics dashboard to work, but all we see is 0 as revenue. We do know we have several successful purchases, but they are not marked as valid within Unity Analytics.

    We do server side validation: get the receipt, mark the purchase as pending, send to our validation server and when receive reply from it we confirm the pending purchase.

    Is there a way to tell Unity IAP that some purchase is valid or not when confirming pending purchase?

    Thanks
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,613
    Did you initiate the test purchases yourself? May I ask how you are confirming (outside of receipt validation) that the purchases are valid? There is not a 100% way to assure the purchases are valid.
     
  6. MatthieuPr

    MatthieuPr

    Joined:
    May 4, 2017
    Posts:
    39
    Those aren't test purchases, those are live users making purchases.

    The user makes a purchase using UnityIAP, once we receive receipt, we mark the purchase as pending and we send the receipt to our server, using a google server account we send the receipt from the server through the google API for validation. After which we receive a response, give the user his items and inform our client that purchase was completed and how (success, canceled, failed). After which we mark purchase as completed from within the client and give feedback on what he purchased.
     
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    2,613