| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  | namespace Guru | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     using System; | 
					
						
							|  |  |  |     using System.Linq; | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     public partial class GuruSDK | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         public static bool IsIAPReady = false; | 
					
						
							| 
									
										
										
										
											2023-12-28 11:29:04 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         //---------- 支付失败原因 ---------- | 
					
						
							|  |  |  |         public const string BuyFail_PurchasingUnavailable = "PurchasingUnavailable"; | 
					
						
							|  |  |  |         public const string BuyFail_Pending = "ExistingPurchasePending"; | 
					
						
							|  |  |  |         public const string BuyFail_ProductUnavailable = "ProductUnavailable"; | 
					
						
							|  |  |  |         public const string BuyFail_SignatureInvalid = "SignatureInvalid"; | 
					
						
							|  |  |  |         public const string BuyFail_UserCancelled = "UserCancelled"; | 
					
						
							|  |  |  |         public const string BuyFail_PaymentDeclined = "PaymentDeclined"; | 
					
						
							|  |  |  |         public const string BuyFail_DuplicateTransaction = "DuplicateTransaction"; | 
					
						
							|  |  |  |         public const string BuyFail_Unknown = "Unknown"; | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2024-04-09 08:58:08 +00:00
										 |  |  |         #region Start | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |          | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 初始化IAP 功能 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							| 
									
										
										
										
											2024-05-21 08:54:25 +00:00
										 |  |  |         public static void InitIAP(string uid, byte[] googleKey, byte[] appleRootCerts) | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         { | 
					
						
							|  |  |  |             GuruIAP.Instance.OnInitResult += OnIAPInitResult; | 
					
						
							|  |  |  |             GuruIAP.Instance.OnRestored += OnRestored; | 
					
						
							|  |  |  |             GuruIAP.Instance.OnBuyStart += OnBuyStart; | 
					
						
							|  |  |  |             GuruIAP.Instance.OnBuyEnd += OnBuyEnd; | 
					
						
							| 
									
										
										
										
											2023-12-28 11:29:04 +00:00
										 |  |  |             GuruIAP.Instance.OnBuyFailed += OnBuyFailed; | 
					
						
							| 
									
										
										
										
											2024-01-19 12:45:56 +00:00
										 |  |  |             GuruIAP.Instance.OnGetProductReceipt += OnGetReceipt; | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |              | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |             Callbacks.IAP.InvokeOnIAPInitStart(); // 初始化之前进行调用 | 
					
						
							| 
									
										
										
										
											2024-03-18 02:22:11 +00:00
										 |  |  |              | 
					
						
							| 
									
										
										
										
											2024-05-21 08:54:25 +00:00
										 |  |  |             GuruIAP.Instance.InitWithKeys(uid, googleKey, appleRootCerts, IsDebugMode); | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-03-18 02:22:11 +00:00
										 |  |  |          | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 初始化结果 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="success"></param> | 
					
						
							|  |  |  |         private static void OnIAPInitResult(bool success) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             LogI($"IAP init result: {success}"); | 
					
						
							|  |  |  |             IsIAPReady = success; | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |             Callbacks.IAP.InvokeOnIAPInitComplete(success); | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         private static bool CheckIAPReady() | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             if (!IsIAPReady) | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 LogE("IAP is not ready, call <GuruSDK.InitIAP> first."); | 
					
						
							|  |  |  |                 return false; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             return true; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-01-19 10:59:18 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-18 02:22:11 +00:00
										 |  |  |         #endregion | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2024-01-19 10:59:18 +00:00
										 |  |  |         #region Data | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-29 06:37:43 +00:00
										 |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 获取商品信息 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productName"></param> | 
					
						
							|  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |         public static ProductInfo GetProductInfo(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |             return GuruIAP.Instance?.GetInfo(productName); | 
					
						
							| 
									
										
										
										
											2024-01-29 06:37:43 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 获取商品信息 (提供 ProductId) | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productId"></param> | 
					
						
							|  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |         public static ProductInfo GetProductInfoById(string productId) | 
					
						
							|  |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |             return GuruIAP.Instance?.GetInfoById(productId); | 
					
						
							| 
									
										
										
										
											2024-01-29 06:37:43 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         [Obsolete("Will be discarded in next version. Using GetProductInfoById(string productId) instead.")] | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         public static ProductSetting GetProductSettingById(string productId) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             var products = GuruSettings.Instance.Products; | 
					
						
							|  |  |  |             if (products != null && products.Length > 0) | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 return products.FirstOrDefault(p => p.ProductId == productId);    | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             return null; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2024-01-29 06:37:43 +00:00
										 |  |  |         [Obsolete("Will be discarded in next version. Using GetProductInfo(string productName) instead.")] | 
					
						
							| 
									
										
										
										
											2023-12-28 11:29:04 +00:00
										 |  |  |         public static ProductSetting GetProductSetting(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             var products = GuruSettings.Instance.Products; | 
					
						
							|  |  |  |             if (products != null && products.Length > 0) | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 return products.FirstOrDefault(p => p.ProductName == productName);    | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             return null; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-01-19 10:59:18 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 查询某个商品是否已经包含订单了 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productName"></param> | 
					
						
							|  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |         public static bool IsProductHasReceipt(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.IsProductHasReceipt(productName); | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-01-29 06:37:43 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         public static string GetProductLocalizedPriceString(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.GetLocalizedPriceString(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-19 10:59:18 +00:00
										 |  |  |         #endregion | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         #region Purchase | 
					
						
							| 
									
										
										
										
											2023-12-28 11:29:04 +00:00
										 |  |  |          | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |         private static Action<string, bool> InvokeOnPurchaseCallback; | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         /// <summary> | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  |         /// 老接口, 将会被废弃 | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         /// </summary> | 
					
						
							| 
									
										
										
										
											2023-12-28 11:29:04 +00:00
										 |  |  |         /// <param name="productName"></param> | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         /// <param name="purchaseCallback"></param> | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  |         [Obsolete("Will be discarded in next version. Using Purchase(string productName, string category, Action<string, bool> purchaseCallback) instead.")] | 
					
						
							| 
									
										
										
										
											2024-05-17 11:30:22 +00:00
										 |  |  |         internal static void Purchase(string productName, Action<string, bool> purchaseCallback = null) | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  |         { | 
					
						
							|  |  |  |             Purchase(productName, "", purchaseCallback); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 购买商品, 通过商品Name | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productName"></param> | 
					
						
							|  |  |  |         /// <param name="category"></param> | 
					
						
							|  |  |  |         /// <param name="purchaseCallback"></param> | 
					
						
							|  |  |  |         public static void Purchase(string productName, string category = "", Action<string, bool> purchaseCallback = null) | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         { | 
					
						
							|  |  |  |             if (CheckIAPReady()) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |                 InvokeOnPurchaseCallback = purchaseCallback; | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  |                 GuruIAP.Instance.Buy(productName, category); | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 购买商品, 通过商品ID | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productId"></param> | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  |         /// <param name="category"></param> | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         /// <param name="purchaseCallback"></param> | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  |         public static bool PurchaseById(string productId, string category = "", Action<string, bool> purchaseCallback = null) | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-01-29 06:37:43 +00:00
										 |  |  |             var productName = GetProductInfoById(productId)?.Name ?? ""; | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |              | 
					
						
							|  |  |  |             if (CheckIAPReady() && !string.IsNullOrEmpty(productName)) | 
					
						
							|  |  |  |             { | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  |                 Purchase(productName, category, purchaseCallback); | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |                 return true; | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |             return false; | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 支付回调 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							| 
									
										
										
										
											2024-03-18 01:13:49 +00:00
										 |  |  |         /// <param name="productName"></param> | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         /// <param name="success"></param> | 
					
						
							| 
									
										
										
										
											2023-12-28 11:29:04 +00:00
										 |  |  |         private static void OnBuyEnd(string productName, bool success) | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-05-17 11:40:42 +00:00
										 |  |  |             if (success) Model.PurchasedCount++; | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |             InvokeOnPurchaseCallback?.Invoke(productName, success); | 
					
						
							|  |  |  |             Callbacks.IAP.InvokeOnPurchaseEnd(productName, success); | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-12-28 11:29:04 +00:00
										 |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 支付开始 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productName"></param> | 
					
						
							|  |  |  |         private static void OnBuyStart(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |             Callbacks.IAP.InvokeOnPurchaseStart(productName); | 
					
						
							| 
									
										
										
										
											2023-12-28 11:29:04 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 支付失败 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productName"></param> | 
					
						
							|  |  |  |         /// <param name="reason"></param> | 
					
						
							|  |  |  |         private static void OnBuyFailed(string productName, string reason) | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |             Callbacks.IAP.InvokeOnPurchaseFailed(productName, reason); | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         #endregion | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         #region Restore Purchase | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 恢复购买 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="restoreCallback"></param> | 
					
						
							| 
									
										
										
										
											2024-01-23 05:57:09 +00:00
										 |  |  |         public static void Restore(Action<bool, string> restoreCallback = null) | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-01-23 05:57:09 +00:00
										 |  |  |             if( restoreCallback != null) Callbacks.IAP.OnIAPRestored += restoreCallback; | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |             if (CheckIAPReady()) | 
					
						
							|  |  |  |             { | 
					
						
							|  |  |  |                 GuruIAP.Instance.Restore(); | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2024-01-23 05:57:09 +00:00
										 |  |  |         private static void OnRestored(bool success, string msg) | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-07-31 04:56:01 +00:00
										 |  |  |             Callbacks.IAP.InvokeOnIAPRestored(success, msg); // 更新回复购买回调 | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         #endregion | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-19 12:45:56 +00:00
										 |  |  |         #region Receipt | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-01-29 06:37:43 +00:00
										 |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 获取订单收据 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productId"></param> | 
					
						
							|  |  |  |         /// <param name="receipt"></param> | 
					
						
							|  |  |  |         /// <param name="appleProductIsRestored"></param> | 
					
						
							| 
									
										
										
										
											2024-01-19 12:45:56 +00:00
										 |  |  |         private static void OnGetReceipt(string productId, string receipt, bool appleProductIsRestored = false) | 
					
						
							|  |  |  |         { | 
					
						
							| 
									
										
										
										
											2024-01-29 06:37:43 +00:00
										 |  |  |             var productName = GetProductInfoById(productId)?.Name ?? ""; | 
					
						
							|  |  |  |             if(!string.IsNullOrEmpty(productName)) | 
					
						
							|  |  |  |                 Model.AddReceipt(receipt, productName, productId, appleProductIsRestored); | 
					
						
							| 
									
										
										
										
											2024-01-19 12:45:56 +00:00
										 |  |  |         } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         #endregion | 
					
						
							| 
									
										
										
										
											2024-05-09 12:35:47 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         #region Subscriptions | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 订阅是否被取消 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productName"></param> | 
					
						
							|  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |         public static bool IsSubscriptionCancelled(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.IsSubscriptionCancelled(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 订阅是否可用 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productName"></param> | 
					
						
							|  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |         public static bool IsSubscriptionAvailable(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.IsSubscriptionAvailable(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         /// <summary> | 
					
						
							|  |  |  |         /// 订阅是否过期 | 
					
						
							|  |  |  |         /// </summary> | 
					
						
							|  |  |  |         /// <param name="productName"></param> | 
					
						
							|  |  |  |         /// <returns></returns> | 
					
						
							|  |  |  |         public static bool IsSubscriptionExpired(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.IsSubscriptionExpired(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         public static bool IsSubscriptionFreeTrail(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.IsSubscriptionFreeTrail(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         public static bool IsSubscriptionAutoRenewing(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.IsSubscriptionAutoRenewing(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         public static bool IsSubscriptionIntroductoryPricePeriod(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.IsSubscriptionIntroductoryPricePeriod(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         public DateTime GetSubscriptionExpireDate(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.GetSubscriptionExpireDate(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2024-03-15 09:12:36 +00:00
										 |  |  |          | 
					
						
							| 
									
										
										
										
											2024-05-09 12:35:47 +00:00
										 |  |  |         public DateTime GetSubscriptionPurchaseDate(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.GetSubscriptionPurchaseDate(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         public DateTime GetSubscriptionCancelDate(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.GetSubscriptionCancelDate(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         public TimeSpan GetSubscriptionRemainingTime(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.GetSubscriptionRemainingTime(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         public TimeSpan GetSubscriptionIntroductoryPricePeriod(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.GetSubscriptionIntroductoryPricePeriod(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         public TimeSpan GetSubscriptionFreeTrialPeriod(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.GetSubscriptionFreeTrialPeriod(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  |         public string GetSubscriptionInfoJsonString(string productName) | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             return GuruIAP.Instance.GetSubscriptionInfoJsonString(productName); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |          | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         #endregion | 
					
						
							| 
									
										
										
										
											2023-12-26 03:40:48 +00:00
										 |  |  |     } | 
					
						
							|  |  |  | } |