Search Unity

  1. Tune in to get all the latest Unity news live from Berlin on June 19, 6pm CEST. Set up a YouTube reminder!
    Dismiss Notice
  2. Unity 2018.1 has arrived! Read about it here
    Dismiss Notice
  3. Scriptable Render Pipeline improvements, Texture Mipmap Streaming, and more! Check out what we have in store for you in the 2018.2 Beta.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. 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:
    41
    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:
    1,602
    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:
    41
    Thanks, it worked!
     
  4. MatthieuPr

    MatthieuPr

    Joined:
    May 4, 2017
    Posts:
    2
    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:
    1,602
    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:
    2
    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:
    1,602