Search Unity

[Solved] Receipt Validation

Discussion in 'Unity IAP' started by Wriggler, Sep 21, 2015.

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

    Wriggler

    Joined:
    Jun 7, 2013
    Posts:
    133
    Hi guys,

    Just posting for some clarification on the receipt verification functions in Unity Analytics. Apologies if this is an obvious answer; I just want to make sure I get this right.

    So my understanding is that you perform the IAP transaction as normal, and pass the receipt from Apple/Google/whoever to Unity Analytics. The receipt will then be tested on the Unity servers and your app will receive a AnalyticsResult enum which tells you how it all went.

    So my question is: should I use Unity's receipt validation to actually deny purchases to dodgy users? In other words, should I be literally doing this?
    if (Analytics.Transaction(...) != AnalyticsResult.Ok) { failTransaction(); }

    ...or should this function be used to simply log the result to Unity and then get angry about piracy afterwards? :)

    If I *should* be denying purchases if Unity says they're bad, does Unity guarantee 100% uptime for this service? It would be pretty poor show for my entire user base to not be able to buy stuff because the Analytics platform is down for maintenance or something.

    Apologies if these are silly questions, but the answers aren't particularly obvious to me from reading the docs.

    Thanks for your help.

    Ben
     
  2. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    Hi @Wriggler,

    Analytics receipt verification is only used to separate your verified transaction data from your unverified transaction data on the dashboard. We only check whether the receipt parameter that is passed is a valid receipt from its respective store. If it is found to be valid it is then counted as verified revenue, if it is not valid then it is counted as unverified revenue. A purchase must have already been made with some type of receipt returned for us to check whether the receipt is valid or not. More information about the specifics of each platform can be found here, http://forum.unity3d.com/threads/tracking-monetization-receipt-verification.314056/

    I hope this clarifies some things for you!
     
  3. Wriggler

    Wriggler

    Joined:
    Jun 7, 2013
    Posts:
    133
    Hi there,

    Yep, that clarifies things perfectly. Thanks for your help!

    Ben
     
    mpinol likes this.
Thread Status:
Not open for further replies.