using System; namespace UnityEngine.Purchasing { /// /// I can unpack JSON Product.receipt values. /// /// See also https://docs.unity3d.com/Manual/UnityIAPPurchaseReceipts.html /// /// /// var unifiedReceipt = JsonUtility.FromJson<UnifiedReceipt>(purchEvtArg.purchasedProduct.receipt) /// Debug.LogFormat("{0} {1} {2}", unifiedReceipt.Payload, unifiedReceipt.Store, unifiedReceipt.TransactionID); /// /// /// [Serializable] public class UnifiedReceipt { /// /// The platform-specific receipt. /// public string Payload; /// /// The name of the store making the receipt. /// public string Store; /// /// The unique identifier of the transaction. /// public string TransactionID; } }