Search Unity

Unity IAP and server side validation ?

Discussion in 'Unity IAP' started by genaray, Sep 2, 2018.

  1. genaray

    genaray

    Joined:
    Feb 8, 2017
    Posts:
    191
    Is it possible to use the easy implementation from unity iap & some kind server side validation ?
    As far as i know unity iap doesnt offer a server side validation... but is it possible to receive the recipe key from unity iap, send it to the server and use the ( for example ) google api to validate the key ?
     
  2. josephsaade

    josephsaade

    Joined:
    Apr 18, 2016
    Posts:
    46
    yes, we do this in our games, you need to implement "public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)"

    Do a client side validation (if you want), the receipt is sent in the arguments:
    e.purchasedProduct.receipt

    You would need to send this receipt to your backend, alongside with platform information and do the validation and currency redemption there.
     
    genaray likes this.
  3. genaray

    genaray

    Joined:
    Feb 8, 2017
    Posts:
    191
    Great thanks a lot ! :D