Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Adding creditcard payment #334

Closed
wants to merge 8 commits into from
Closed

Conversation

fatboypunk
Copy link
Contributor

Going to solve #35

  • needs design
  • we should adjust the fee every month to the number of users (rake task)
  • stop subscriptions
  • be able to remove de-activate users
  • metrics http://home.profitwell.com/

@@ -0,0 +1,5 @@
require 'rails_helper'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@dkhgh
Copy link
Member

dkhgh commented Jun 25, 2015

  1. Should we disable this by default in single tenant mode?
  2. Should we disable this when no stripe config is set up through ENV?

@fatboypunk
Copy link
Contributor Author

Should we disable this by default in single tenant mode?
Should we disable this when no stripe config is set up through ENV?

Yes and yes

@user_count ||= User.count
end
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 trailing blank lines detected.

email: current_user.email,
quantity: user_count
)
pp customer.instance_methods(false)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not write to stdout. Use Rails' logger if you want to log.

end

def costs
enabled? ? @number_of_users * price : 0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary spacing detected.

sign_in_user(user, subdomain: subdomain)

visit users_url(subdomain: subdomain)
expect(page).not_to have_selector("input[type=submit][value='#{I18n.t("users.de_activate")}']")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [101/80]
Prefer single-quoted strings inside interpolations.

@fatboypunk fatboypunk force-pushed the marcel/stripe branch 2 times, most recently from bb55534 to cb280d4 Compare July 3, 2015 15:45
@@ -44,7 +9,7 @@ class User < ActiveRecord::Base
:confirmable,
:invitable

validates_presence_of :first_name, :last_name
validates_presence_of :first_name, :last_name, :active

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer the new style validations validates :column, presence: value over validates_presence_of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants