Пример #1
0
 public void OnUpdateProfile(AdaptyError error)
 {
     if (error != null)
     {
         Debug.Log("Error message: " + error.message + ", code: " + error.code);
     }
 }
Пример #2
0
    // Adapty Callbacks

    public void OnIdentify(AdaptyError error)
    {
        if (error != null)
        {
            Debug.Log("Error message: " + error.message + ", code: " + error.code);
        }
    }
Пример #3
0
 public void OnSyncPurchases(AdaptyError error)
 {
     if (error != null)
     {
         Debug.Log("Error message: " + error.message + ", code: " + error.code);
     }
 }
Пример #4
0
 public void OnUpdateAttribution(AdaptyError error)
 {
     if (error != null)
     {
         Debug.Log("Error message: " + error.message + ", code: " + error.code);
     }
 }
Пример #5
0
 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");
         }
     }
 }
Пример #6
0
 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);
     }
 }
Пример #7
0
 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);
     }
 }
Пример #8
0
 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);
         }
     }
 }
Пример #9
0
 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);
             }
         }
     }
 }
Пример #10
0
 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);
             }
         }
     }
 }
Пример #11
0
 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);
         }
     }
 }