public void OnUpdateProfile(AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } }
// Adapty Callbacks public void OnIdentify(AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } }
public void OnSyncPurchases(AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } }
public void OnUpdateAttribution(AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } }
public void OnGetPromo(PromoModel promo, AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } else { if (promo != null) { Debug.Log("Promo promoType:" + promo.promoType + ", expiresAt:" + promo.expiresAt); } else { Debug.Log("No promo"); } } }
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 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 OnGetPaywalls(PaywallModel[] paywalls, ProductModel[] products, DataState state, AdaptyError error) { if (error != null) { Debug.Log("Error message: " + error.message + ", code: " + error.code); } else { Debug.Log("State: " + state); foreach (PaywallModel paywall in paywalls) { Debug.Log("Paywall developerId: " + paywall.developerId + ", products: " + paywall.products.Length); } foreach (ProductModel product in products) { retrievedProducts.Add(product); Debug.Log("Product price: " + product.localizedPrice + ", vendorProductId: " + product.vendorProductId + ", skuId: " + product.skuId); } } }