void IStore.Initialize(IStoreCallback callback) { this.storeEvents = callback; this.BaseInit(); this.CreateClient(); }
#pragma warning restore 0414 /// <summary> /// Overriding the initialization with setting the correct store. /// </summary> public override void Initialize(IStoreCallback callback) { storeId = "Steam"; this.callback = callback; microTxnAuthorizationResponse = Callback <MicroTxnAuthorizationResponse_t> .Create(OnMicroTxnAuthorizationResponse); }
/// <summary> /// Initialize the instance using the specified IStoreCallback. /// </summary> public void Initialize(IStoreCallback callback) { this.callback = callback; IOSInAppPurchaseManager.OnStoreKitInitComplete += OnProductsRetrieved; IOSInAppPurchaseManager.OnTransactionComplete += OnPurchaseSucceeded; #if !UNITY_EDITOR if (!IOSInAppPurchaseManager.Instance.IsInAppPurchasesEnabled) { OnSetupFailed("Apple App Store billing is disabled."); return; } #endif definitions = IAPManager.GetProductDefinitions(); IOSNativeSettings.Instance.InAppProducts.Clear(); for (int i = 0; i < definitions.Length; i++) { IOSInAppPurchaseManager.Instance.AddProductId(definitions[i].storeSpecificId); #if UNITY_EDITOR IAPObject obj = IAPManager.GetIAPObject(definitions[i].id); IOSNativeSettings.Instance.InAppProducts[i].DisplayName = obj.title; IOSNativeSettings.Instance.InAppProducts[i].Description = obj.description; IOSNativeSettings.Instance.InAppProducts[i].LocalizedPrice = obj.realPrice; #endif } IOSInAppPurchaseManager.Instance.LoadStore(); }
/// <summary> /// Initialize the instance using the specified IStoreCallback. /// </summary> public virtual void Initialize(IStoreCallback callback) { this.callback = callback; AndroidInAppPurchaseManager.ActionBillingSetupFinished += OnInitialized; AndroidInAppPurchaseManager.ActionRetrieveProducsFinished += OnProductsRetrieved; AndroidInAppPurchaseManager.ActionProductPurchased += OnPurchaseSucceeded; AndroidInAppPurchaseManager.ActionProductConsumed += OnTransactionFinished; if (!AndroidNativeSettings.Instance.IsBase64KeyWasReplaced) { Debug.LogWarning("Google Store Public Key missing in Android Native Settings. " + "Purchases for real money won't be supported on the device."); } definitions = IAPManager.GetProductDefinitions(); AndroidNativeSettings.Instance.InAppProducts.Clear(); for (int i = 0; i < definitions.Length; i++) { AndroidInAppPurchaseManager.Client.AddProduct(definitions[i].storeSpecificId); #if UNITY_EDITOR IAPObject obj = IAPManager.GetIAPObject(definitions[i].id); AndroidNativeSettings.Instance.InAppProducts[i].Title = obj.title; AndroidNativeSettings.Instance.InAppProducts[i].Description = obj.description; AndroidNativeSettings.Instance.InAppProducts[i].LocalizedPrice = obj.realPrice; #endif } AndroidInAppPurchaseManager.Client.Connect(); }
public static Product FindProductById(this IStoreCallback storeCallback, string sku) { if (sku != null && storeCallback.products != null) { return(storeCallback.products.WithID(sku) ?? storeCallback.products.WithStoreSpecificID(sku)); } return(null); }
void IStore.Initialize(IStoreCallback callback) { Debug.Log("UnityIapProvider - HuaweiStore Initialize is started!"); this.storeEvents = callback; this.BaseInit(); this.CreateClient(); }
public void Initialize(IStoreCallback callback) { _callback = callback; KongregateWeb.StoreItemsReceived += OnItemList; KongregateWeb.UserItemsReceived += OnUserItemsUpdated; KongregateWeb.PurchaseSucceeded += OnPurchaseSuccess; KongregateWeb.PurchaseFailed += OnPurchaseFail; }
public void NotifyDeferredProrationUpgradeDowngradeSubscription(IStoreCallback storeCallback, string productId) { Product product = storeCallback.FindProductById(productId); if (product != null) { m_DeferredProrationUpgradeDowngradeSubscriptionAction?.Invoke(product); } }
public void NotifyDeferredPurchase(IStoreCallback storeCallback, string productId, string receipt, string transactionId) { Product product = storeCallback.FindProductById(productId); if (product != null) { ProductPurchaseUpdater.UpdateProductReceiptAndTransactionID(product, receipt, transactionId, GooglePlay.Name); m_DeferredPurchaseAction?.Invoke(product); } }
/// <summary> /// Init GooglePlayStore /// </summary> /// <param name="callback">The `IStoreCallback` will be call when receiving events from the google store</param> public override void Initialize(IStoreCallback callback) { var scriptingStoreCallback = new ScriptingStoreCallback(callback, m_Util); m_RetrieveProductsService.SetStoreCallback(scriptingStoreCallback); m_FetchPurchases.SetStoreCallback(scriptingStoreCallback); m_FinishTransactionService.SetStoreCallback(scriptingStoreCallback); m_GooglePurchaseCallback.SetStoreCallback(scriptingStoreCallback); m_GooglePlayStoreExtensions.SetStoreCallback(scriptingStoreCallback); }
internal static void ProvideProductsToAds(JSONStore purchaser, IStoreCallback manager, bool shouldLog = false) { if ((purchaser == null) || (manager == null)) { s_Logger.LogError("UnityIAP Promo", "Attempt to set promo products without a valid purchaser!"); return; } s_PromoPurchaser = purchaser; s_Unity = manager; ProvideProductsToAds(UpdatePromoProductList(), shouldLog); }
/// <summary> /// Initialize the instance using the specified IStoreCallback. /// </summary> public virtual void Initialize(IStoreCallback callback) { this.callback = callback; Billing.DidFinishRequestForBillingProductsEvent += OnProductsRetrieved; Billing.DidFinishProductPurchaseEvent += OnPurchaseSucceeded; Billing.DidFinishRestoringPurchasesEvent += OnPurchaseSucceeded; #if UNITY_ANDROID if (string.IsNullOrEmpty(NPSettings.Billing.Android.PublicKey)) { Debug.LogWarning("Google Store Public Key missing in VoxelBuster Native Settings. " + "Purchases for real money won't be supported on the device."); } #endif }
public override void Initialize(IStoreCallback callback) { this.unity = callback; if (m_Module != null) { var storeName = m_Module.storeInstance.storeName; } else { if (m_Logger != null) { m_Logger.LogWarning("UnityIAP", "JSONStore init has no reference to SPM, can't start managed store"); } } }
public void Initialize(IStoreCallback callback) { _callback = callback; _billingClientStateListener = new BillingClientStateListener(); // Retry connection when Play Billing Service is disconnected. _billingClientStateListener.OnBillingServiceDisconnected += () => { _billingUtil.LogWarningFormat("Service disconnected, retrying connection..."); EndConnection(); InstantiateBillingClientAndMakeConnection(); }; // Mark Billing Client startConnection method call as completed. _billingClientStateListener.OnBillingSetupFinished += MarkBillingClientStartConnectionCallComplete; InstantiateBillingClientAndMakeConnection(); // Block this method until startConnection call finishes. This is because the follow-up call will depend on // this connection. _billingClientStartConnectionCallStatus.WaitOne(Constants.BillingClientAsyncTimeout); }
public override void Initialize(IStoreCallback callback) { this.unity = callback; m_EventQueue = EventQueue.Instance(m_Module.util, m_Module.webUtil); m_profileData = ProfileData.Instance(m_Module.util); if (m_Module != null) { var storeName = m_Module.storeInstance.storeName; m_profileData.SetStoreName(storeName); if (String.IsNullOrEmpty(iapBaseUrl)) { iapBaseUrl = kIecCatalogBase; } m_managedStore = StoreCatalogImpl.CreateInstance(storeName, iapBaseUrl, m_Module.webUtil, m_Module.logger, m_Module.util, this); } else { if (m_Logger != null) { m_Logger.LogWarning("UnityIAP", "JSONStore init has no reference to SPM, can't start managed store"); } } }
/// <summary> /// Initialize the instance using the specified IStoreCallback. /// </summary> public virtual void Initialize(IStoreCallback callback) { this.callback = callback; }
public void Initialize(IStoreCallback callback) { _biller = callback; }
public ScriptingStoreCallback(IStoreCallback forwardTo, IUtil util) { m_ForwardTo = forwardTo; m_Util = util; }
/// <summary> /// Overriding the initialization with setting the correct store. /// </summary> public override void Initialize(IStoreCallback callback) { storeId = "Facebook"; this.callback = callback; }
void IStorePrinterService.registerPrinter() { printer = OperationContext.Current.GetCallbackChannel<IStoreCallback>(); }
void IStorePrinterService.unregisterPrinter() { printer = null; }
public void SetStoreCallback(IStoreCallback storeCallback) { m_GooglePlayStoreExtensions?.SetStoreCallback(storeCallback); }
/// <summary> /// Overriding the initialization with setting the correct store. /// </summary> public override void Initialize(IStoreCallback callback) { storeId = "PayPal"; this.callback = callback; }
/// <summary> /// This function only save the IStoreCallback. /// The initialization of UDP is put into <see cref="RetrieveProducts"/>, /// because in <see cref="PurchasingManager"/>, <see cref="Initialize"/> and <see cref="RetrieveProducts"/> /// will be called together. /// However, for UDP, <see cref="RetrieveProducts"/> must been done AFTER <see cref="Initialize"/> succeeds. /// If the <see cref="Initialize"/> involves login, it may take a long time and <see cref="RetrieveProducts"/> /// will fail. /// </summary> /// <param name="callback"></param> public override void Initialize(IStoreCallback callback) { unity = callback; }
/// <summary> /// <para>Called when Unity IAP is initializing.</para> /// </summary> /// <param name="callback">Callback for stores to interact with Unity IAP.</param> public abstract void Initialize(IStoreCallback callback);
public void Initialize(IStoreCallback biller) { m_Biller = biller; }
public void Initialize(IStoreCallback callback) { _callback = callback; }
public override void Initialize(IStoreCallback callback) { _callback = callback; _socialAPIManager.ProductPurchased += OnSocialProductPurchased; _socialAPIManager.ProductPurchaseFailed += OnSocialProductPurchaseFailed; }
public void SetStoreCallback(IStoreCallback storeCallback) { m_StoreCallback = storeCallback; }
/// <summary> /// Terminal - no callback required /// </summary> /// <param name="callback"></param> public abstract void Initialize(IStoreCallback callback);
public FakeStoreUIMode UIMode = FakeStoreUIMode.Default; // Requires UIFakeStore public override void Initialize(IStoreCallback biller) { m_Biller = biller; base.Initialize(biller); base.SetNativeStore(this); }
public override void Initialize(IStoreCallback biller) { this.callback = biller; }