i want to get subscription please help.. here is my code
module BillingHelper
def check_if_user_already_subscribe(plan_id)
customer = Stripe::Customer.new current_user.stripe_id
subscriptions = Stripe::Subscription.list(customer: customer.id)
plan_ids = get_from_subcriptions
if plan_ids.include?(plan_id)
true
else
false
end
end
end
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
i want to get subscription please help.. here is my code
module BillingHelper
def check_if_user_already_subscribe(plan_id)
customer = Stripe::Customer.new current_user.stripe_id
subscriptions = Stripe::Subscription.list(customer: customer.id)
plan_ids = get_from_subcriptions
if plan_ids.include?(plan_id)
true
else
false
end
end
end