public void purchaseFailedEvent(string error) { purchaseProcessCompleted = true; LogUtil.LogProduct("purchase failed with error: " + error); ProductNetworksRecord data = ProductNetworksRecord.Create( "error", "Product Purchase FAILED", error, false, error, "", "", 1, ProductNetworksType.typeThirdParty, ProductStoreType.typeApple); BroadcastProductNetworksFailed(data); }
// THIRD PARTY EVENTS #if PURCHASE_USE_APPLE_ITUNES_PRIME31 public void purchaseSuccessfulEvent(StoreKitTransaction transaction) { LogUtil.LogProduct("SCREEN purchased product: " + transaction.productIdentifier + ", quantity: " + transaction.quantity); //transaction.base64EncodedTransactionReceipt SetContentAccessPermissions(transaction.productIdentifier); Contents.SetContentAccessTransaction(transaction.productIdentifier, transaction.productIdentifier, transaction.base64EncodedTransactionReceipt, transaction.quantity, true); purchaseProcessCompleted = true; ProductNetworksRecord data = ProductNetworksRecord.Create( transaction.productIdentifier, "Product Purchase", "Product purchased:" + transaction.productIdentifier, true, transaction.ToJson(), transaction.base64EncodedTransactionReceipt, transaction.productIdentifier, transaction.quantity, ProductNetworksType.typeThirdParty, ProductStoreType.typeApple); BroadcastProductNetworksSuccess(data); }