Ejemplo n.º 1
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);
             }
         }
     }
 }
Ejemplo n.º 2
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);
             }
         }
     }
 }
Ejemplo n.º 3
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);
     }
 }
Ejemplo n.º 4
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);
     }
 }
Ejemplo n.º 5
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);
         }
     }
 }
Ejemplo n.º 6
0
 public void OnPurchaserInfoUpdated(PurchaserInfoModel purchaserInfo)
 {
     Debug.Log("Purchaser customerUserId: " + purchaserInfo.customerUserId + ", accessLevels: " + purchaserInfo.accessLevels.Count + ", subscriptions: " + purchaserInfo.subscriptions.Count + ", nonSubscriptions: " + purchaserInfo.nonSubscriptions.Count);
 }