public void OnRestorePurchases(PurchaserInfoModel purchaserInfo, string receipt, Dictionary <string, object>[] validationResults, AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } else { if (purchaserInfo != null) { Debug.Log("Purchaser customerUserId: " + purchaserInfo.customerUserId + ", accessLevels: " + purchaserInfo.accessLevels.Count + ", subscriptions: " + purchaserInfo.subscriptions.Count + ", nonSubscriptions: " + purchaserInfo.nonSubscriptions.Count); } Debug.Log("Receipt/PurchaseToken: " + receipt); if (retrievedReceipt == null) { retrievedReceipt = receipt; } if (validationResults != null && validationResults.Length > 0) { foreach (KeyValuePair <string, object> item in validationResults[0]) { Debug.Log("ValidationResult " + item.Key + ": " + item.Value); } } } }
public void OnMakePurchase(PurchaserInfoModel purchaserInfo, string receipt, Dictionary <string, object> validationResult, ProductModel product, AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } else { if (purchaserInfo != null) { Debug.Log("Purchaser customerUserId: " + purchaserInfo.customerUserId + ", accessLevels: " + purchaserInfo.accessLevels.Count + ", subscriptions: " + purchaserInfo.subscriptions.Count + ", nonSubscriptions: " + purchaserInfo.nonSubscriptions.Count); } Debug.Log("Receipt/PurchaseToken: " + receipt); if (product != null) { Debug.Log("Product price: " + product.localizedPrice + ", vendorProductId: " + product.vendorProductId + ", skuId: " + product.skuId); } if (retrievedReceipt == null) { retrievedReceipt = receipt; } if (validationResult != null) { foreach (KeyValuePair <string, object> item in validationResult) { Debug.Log("ValidationResult " + item.Key + ": " + item.Value); } } } }
public void OnMakeDeferredPurchase(PurchaserInfoModel purchaserInfo, string receipt, Dictionary <string, object> validationResult, ProductModel product, AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } else { Debug.Log("Purchaser customerUserId: " + purchaserInfo.customerUserId + ", accessLevels: " + purchaserInfo.accessLevels.Count + ", subscriptions: " + purchaserInfo.subscriptions.Count + ", nonSubscriptions: " + purchaserInfo.nonSubscriptions.Count); } }
public void OnGetPurchaserInfo(PurchaserInfoModel purchaserInfo, DataState state, AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } else { if (purchaserInfo != null) { Debug.Log("Purchaser customerUserId: " + purchaserInfo.customerUserId + ", accessLevels: " + purchaserInfo.accessLevels.Count + ", subscriptions: " + purchaserInfo.subscriptions.Count + ", nonSubscriptions: " + purchaserInfo.nonSubscriptions.Count); } Debug.Log("State: " + state); } }
public void OnValidateGooglePurchase(PurchaserInfoModel purchaserInfo, Dictionary <string, object> validationResult, AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } else { if (purchaserInfo != null) { Debug.Log("Purchaser customerUserId: " + purchaserInfo.customerUserId + ", accessLevels: " + purchaserInfo.accessLevels.Count + ", subscriptions: " + purchaserInfo.subscriptions.Count + ", nonSubscriptions: " + purchaserInfo.nonSubscriptions.Count); } foreach (KeyValuePair <string, object> item in validationResult) { Debug.Log("ValidationResult " + item.Key + ": " + item.Value); } } }
public void OnPurchaserInfoUpdated(PurchaserInfoModel purchaserInfo) { Debug.Log("Purchaser customerUserId: " + purchaserInfo.customerUserId + ", accessLevels: " + purchaserInfo.accessLevels.Count + ", subscriptions: " + purchaserInfo.subscriptions.Count + ", nonSubscriptions: " + purchaserInfo.nonSubscriptions.Count); }