Search Unity

[Solved] How to get the Android' raw json of SkuDetails?

Discussion in 'Unity IAP' started by damelin2, Jul 27, 2017.

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

    damelin2

    Joined:
    Jan 8, 2013
    Posts:
    19
    Hi,

    Is it possible to access the json sent from Google for SkuDetails?

    Thanks!
     
  2. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @damelin2

    EDIT
    A colleague pointed out that you are asking for product data and not receipt data. In that case, we don't expose it directly, but the information is in our ProductMetadata object.

    With this available, do you still need direct access to the JSON? If so, what is your use case or what goal are you trying to solve?

    My original message is only relevant for receipt data, not product data:

    Yes, the receipt from Google is available within the Unity Receipt. The format for various stores are detailed here:
    https://docs.unity3d.com/Manual/UnityIAPPurchaseReceipts.html

    There is a post with some details on how to parse Google and iOS receipts here:
    https://forum.unity3d.com/threads/how-do-i-track-auto-renewing-subscriptions.476293/#post-3108170
     
    Last edited: Jul 27, 2017
  3. damelin2

    damelin2

    Joined:
    Jan 8, 2013
    Posts:
    19
    I saw this Unity Receipt, but I was referring to the Sku Details received when querying the product inventory on initialize. It's not related to a purchase (or receipt.) It's the data returned by getSkuDetails() : https://developer.android.com/google/play/billing/billing_reference.html

    I guess that I have all the information to rebuild it, but I'd have preferred to use the data received by the OS
     
  4. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    @damelin2

    Yeah, I noticed that mistake and updated my post. Hope that helps!
     
  5. damelin2

    damelin2

    Joined:
    Jan 8, 2013
    Posts:
    19
    Yes this is enough information. I'm using a third party plugin that track purchases and it asking some information (like the raw sku details json) in order to validate the purchases. I'll rebuild the json with the information provided.

    Thanks
     
  6. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Out of curiosity, which plugin are you using?
     
  7. damelin2

    damelin2

    Joined:
    Jan 8, 2013
    Posts:
    19
    Its the plugin of the Tapjoy services
     
    ap-unity likes this.
Thread Status:
Not open for further replies.