private void OnInitializeFailed(InitializationFailureReason reason) { if (log != null) { log.text = reason.ToString(); } UserEventsTracker.TrackEvent("Purchase screen. OnInitializeFailed:" + reason.ToString()); purchaseButton.interactable = false; }
void Start() { UserEventsTracker.TrackEvent("Purchase screen. Start"); _iapModule = new UnityIAP(); _iapModule.Init(OnInitializeFailed); EventsChannel.General.Subscribe(EventConstants.PurchaseSuccess, (o, o1) => { UserEventsTracker.TrackEvent("Purchase screen. Success purchase"); OnSuccessPurchase(); }); EventsChannel.General.Subscribe(EventConstants.PurchaseFailed, (o, o1) => { UserEventsTracker.TrackEvent("Purchase screen. Purchase failed:" + o1.ToString()); OnFailedPurchase((PurchaseFailureReason)o1); }); }
public void Back() { UserEventsTracker.TrackEvent("Purchase screen. Back button clicked"); SceneManager.LoadScene(Constants.MenuSceneName); }
void Purchase() { UserEventsTracker.TrackEvent("Purchase screen. Click purchase"); _iapModule.BuyProduct(); }