public void queryPurchasesSucceeded(string jsonStr) { JSONNode dataNode = JSON.Parse(jsonStr); JSONArray purchasesJsonArray = dataNode.AsArray; var purchases = MyketPurchase.fromJsonArray(purchasesJsonArray); queryPurchasesSucceededEvent.SafeInvoke(purchases); }
public void queryInventorySucceeded(string jsonStr) { JSONNode dataNode = JSON.Parse(jsonStr); JSONArray purchasesJsonArray = dataNode["purchases"].AsArray; var purchases = MyketPurchase.fromJsonArray(purchasesJsonArray); JSONArray skusJsonArray = dataNode["skus"].AsArray; var skus = MyketSkuInfo.fromJsonArray(skusJsonArray); queryInventorySucceededEvent.SafeInvoke(purchases, skus); }