public static bool IsProductReceiptValid(Product product) { if (product == null) { return(false); } #if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_OSX var validator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), Application.identifier); try { var result = validator.Validate(product.receipt); UDBG.Log("Receipt is valid. Contents:"); foreach (IPurchaseReceipt productReceipt in result) { UDBG.Log(productReceipt.productID); UDBG.Log(productReceipt.purchaseDate); UDBG.Log(productReceipt.transactionID); } } catch (IAPSecurityException exception) { UDBG.Log("Invalid receipt not unlcokded content".Attrib(bold: true, italic: true, color: "r")); return(false); } #endif return(true); }
public void UpdateResume(bool pause) => UDBG.Log($"{nameof(GameModeService)}.{nameof(UpdateResume)}() => {pause}");
public override void Load(TutorialStateSave save) { base.Load(save); UDBG.Log($"{nameof(ShowTransferAndPersonalPurchasesState)} loaded"); }