public ApolloHelper() { IApollo.Instance.Initialize(this.info); IApollo.Instance.SetApolloLogger(ApolloLogPriority.None, null); this.accountService = IApollo.Instance.GetAccountService(); this.payService = null; this.registerInfo = new RegisterInfo(); this.snsService = IApollo.Instance.GetService(1) as IApolloSnsService; this.reportService = IApollo.Instance.GetService(3) as IApolloReportService; this.quickLoginService = IApollo.Instance.GetService(7) as IApolloQuickLoginService; this.m_IsSwitchToLoginPlatform = false; this.m_IsLoginEventHandlerRegistered = false; this.m_IsLoginReturn = false; this.CurPlatform = ApolloPlatform.None; this.m_LastOpenID = null; this.m_LastTriedPlatform = ApolloPlatform.None; this.m_IsLastTriedPlatformSet = false; if (File.Exists(Application.persistentDataPath + "/customOpenId.txt")) { this.IsNoneModeSupport = true; } else { this.IsNoneModeSupport = false; } }
public ApolloHelper() { this.info = new ApolloInfo(ApolloConfig.QQAppID, ApolloConfig.WXAppID, ApolloConfig.maxMessageBufferSize, string.Empty); IApollo.Instance.Initialize(this.info); IApollo.Instance.SetApolloLogger(ApolloLogPriority.None, null); this.accountService = IApollo.Instance.GetAccountService(); this.payService = null; this.registerInfo = new RegisterInfo(); this.snsService = (IApollo.Instance.GetService(1) as IApolloSnsService); this.reportService = (IApollo.Instance.GetService(3) as IApolloReportService); this.quickLoginService = (IApollo.Instance.GetService(7) as IApolloQuickLoginService); this.m_IsSwitchToLoginPlatform = false; this.m_IsLoginEventHandlerRegistered = false; this.m_IsLoginReturn = false; this.CurPlatform = ApolloPlatform.None; this.m_LastOpenID = null; this.m_LastTriedPlatform = ApolloPlatform.None; this.m_IsLastTriedPlatformSet = false; this.IsLastLaunchFrom3rdAPP = false; if (File.Exists(Application.persistentDataPath + "/customOpenId.txt")) { this.IsNoneModeSupport = true; } else { this.IsNoneModeSupport = false; } HttpDnsPolicy.Init(); }
public bool InitPay() { string payEnv = ApolloConfig.payEnv; if (this.GetAccountInfo(false) == null) { Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Need_Login); return(false); } if (this.payService == null) { this.payService = IApollo.Instance.GetService(2) as IApolloPayService; this.payService.PayEvent += new OnApolloPaySvrEvenHandle(this.OnPaySuccess); } this.registerInfo.environment = payEnv; this.registerInfo.enableLog = 1; if (this.payService.Initialize(this.registerInfo)) { Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Init_Success); return(true); } Singleton <EventRouter> .GetInstance().BroadCastEvent(EventID.ApolloHelper_Pay_Init_Failed); return(false); }
public ApolloHelper() { IApollo.Instance.Initialize(this.info); IApollo.Instance.SetApolloLogger(ApolloLogPriority.None, null); this.accountService = IApollo.Instance.GetAccountService(); this.payService = null; this.registerInfo = new RegisterInfo(); this.snsService = IApollo.Instance.GetService(1) as IApolloSnsService; this.reportService = IApollo.Instance.GetService(3) as IApolloReportService; this.quickLoginService = IApollo.Instance.GetService(7) as IApolloQuickLoginService; this.m_IsSwitchToLoginPlatform = false; this.m_IsLoginEventHandlerRegistered = false; this.m_IsLoginReturn = false; this.m_CurPlatform = ApolloPlatform.None; this.m_LastOpenID = null; this.m_LastTriedPlatform = ApolloPlatform.None; this.m_IsLastTriedPlatformSet = false; }