Ability to change stored credit card

This commit is contained in:
Kyle Drake 2015-08-12 15:04:47 -05:00
parent b6686531c7
commit ec306f9059
6 changed files with 86 additions and 4 deletions

View file

@ -980,6 +980,10 @@ class Site < Sequel::Model
PLAN_FEATURES[plan_type.to_sym][:name]
end
def stripe_paying_supporter?
stripe_customer_id && !plan_ended && values[:plan_type].match(/free|special/).nil?
end
def unconverted_legacy_supporter?
stripe_customer_id && !plan_ended && values[:plan_type].nil? && stripe_subscription_id.nil?
end