Service class for the store category model.
Inheritance: StoreServiceBase
        protected void btnInstall_Click( object sender, EventArgs e )
        {
            StoreService storeService = new StoreService();

            string errorResponse = string.Empty;
            var installResponse = storeService.Purchase( txtUsername.Text, txtPassword.Text, packageId, out errorResponse );
            if ( installResponse != null )
            {
                switch ( installResponse.PurchaseResult )
                {
                    case PurchaseResult.AuthenticationFailed:
                        lMessages.Text = string.Format( "<div class='alert alert-warning margin-t-md'><strong>Could Not Authenticate</strong> {0}</div>", installResponse.Message );
                        break;
                    case PurchaseResult.Error:
                        lMessages.Text = string.Format( "<div class='alert alert-warning margin-t-md'><strong>An Error Occurred</strong> {0}</div>", installResponse.Message );
                        break;
                    case PurchaseResult.NoCardOnFile:
                        lMessages.Text = string.Format( "<div class='alert alert-warning margin-t-md'><strong>No Card On File</strong> No credit card is on file for your organization. Please add a card from your <a href='{0}'>Account Page</a>.</div>", ResolveRockUrl( "~/RockShop/Account" ) );
                        break;
                    case PurchaseResult.NotAuthorized:
                        lMessages.Text = string.Format( "<div class='alert alert-warning margin-t-md'><strong>Unauthorized</strong> You are not currently authorized to make purchases for this organization. Please see your organization's primary contact to enable your account for purchases.</div>" );
                        break;
                    case PurchaseResult.PaymentFailed:
                        lMessages.Text = string.Format( "<div class='alert alert-warning margin-t-md'><strong>Payment Error</strong> An error occurred while processing the credit card on file for your organization. The error was: {0}. Please update your card's information from your <a href='{1}'>Account Page</a>.</div>", installResponse.Message, ResolveRockUrl( "~/RockShop/Account" ) );
                        break;
                    case PurchaseResult.Success:
                        ProcessInstall( installResponse );
                        break;
                }
            }
            else
            {
                lMessages.Text = string.Format( "<div class='alert alert-danger margin-t-md'><strong>Install Error</strong> An error occurred while attempting to authenticate your install of this package. The error was: {0}.</div>", ( string.IsNullOrWhiteSpace( errorResponse ) ? "Unknown" : errorResponse ) );
            }
        }
        private void ProcessNoResults()
        {
            string errorMessage = string.Empty;

            // first check that the username/password they provided are correct
            bool canAuthicate = new StoreService().AuthenicateUser( txtUsername.Text, txtPassword.Text);

            if ( canAuthicate )
            {
                lMessages.Text = @"<div class='alert alert-warning margin-t-md'>It appears that no organizations have been configured for this account. You can
                                set up an organization on the Rock RMS website. Simply login and then select 'My Account' from the dropdown in the top right
                                corner.</div>";
            }
            else
            {
                lMessages.Text = @"<div class='alert alert-warning margin-t-md'>The username/password provided did not match a user on the Rock RMS website. Be sure
                    you provide a valid account from this site. If you would like to create an account or retrieve your password please <a href='https://www.rockrms.com/Rock/Login'>
                    vistit the Rock RMS website</a>.</div>";
            }
        }