public QuickbooksController() { var oSettings = new MemberProtectSettings(ConfigurationManager.ConnectionStrings["MemberProtectConnectionString"].ConnectionString); m_oMemberProtect = new MemberProtect(oSettings); m_sServiceInvoicePath = ConfigurationManager.AppSettings["ServiceInvoicePath"]; m_sWebsiteInvoicePath = ConfigurationManager.AppSettings["WebsiteInvoicePath"]; m_sInvoiceUrl = ConfigurationManager.AppSettings["InvoiceUrl"]; m_sPaymentUrl = ConfigurationManager.AppSettings["PaymentUrl"]; }
public ApplicationContext(HttpContext oHttpContext) { m_oHttpContext = oHttpContext; var oSettings = new MemberProtectSettings(Settings.ConnectionString, m_oHttpContext.Session.SessionID, m_oHttpContext.Request.UserAgent, m_oHttpContext.Request.UserHostAddress); m_oMemberProtect = new MemberProtect(oSettings); RequestContextHelper.Init(m_oMemberProtect); }
public CreditCardService(Guid customerMemberProtectUserId, MemberProtect memberProtect, DataAccessDataContext dataContext, SitePropertiesService siteProperties) { _memberProtect = memberProtect; _dataContext = dataContext; _siteProperties = siteProperties; _enableDebug = siteProperties.AuthorizeNetIsDebug; _loginId = _memberProtect.Cryptography.Decrypt(_siteProperties.AuthorizeNetLoginID); _transactionKey = _memberProtect.Cryptography.Decrypt(_siteProperties.AuthorizeNetTransactionKey); _customerMemberProtectUserId = customerMemberProtectUserId; // audit if (memberProtect.CurrentUser.UserID != customerMemberProtectUserId) { // log that user is access customer credit card data? } }
public void Dispose() { if (m_oMemberProtect != null) { m_oMemberProtect.Dispose(); m_oMemberProtect = null; } }
protected override void OnUnload(EventArgs e) { base.OnUnload(e); if(m_oMemberProtect != null) { m_oMemberProtect.Dispose(); m_oMemberProtect = null; } }
protected override void OnInit(EventArgs e) { MemberProtectSettings oSettings = new MemberProtectSettings(ConfigurationManager.ConnectionStrings["SpeedySpotsConnectionString"].ConnectionString, Session.SessionID); m_oMemberProtect = new MemberProtect(oSettings); if(BodyTag != null) { BodyTag.ID = System.IO.Path.GetFileNameWithoutExtension(HttpContext.Current.Request.FilePath); } base.OnInit(e); if(GetAccessControl() == AccessControl.Private) { // Ensure user has logged in if(!MemberProtect.CurrentUser.IsAuthorized) { Response.Redirect("~/InetActive/login.aspx"); return; } // Ensure user is not locked out if(MemberProtect.CurrentUser.IsLocked) { RedirectMessage("~/InetActive/login.aspx", "Your account has been locked.", MessageTone.Negative); return; } } // Javascript Includes Page.ClientScript.RegisterClientScriptInclude("Common", Page.ResolveUrl("~/InetActive/scripts/common.js")); }
public static void Init(MemberProtect app) { HttpContext.Current.Items[MPInstanceKey] = app; }
public CustomerCreditCardViewModel(MemberProtect memberProtect, IACustomerCreditCard customerCreditCard) { IACustomerCreditCard = customerCreditCard; _memberProtect = memberProtect; }