mirror of
https://github.com/we-promise/sure.git
synced 2026-04-11 16:24:51 +00:00
Agent-Logs-Url: https://github.com/we-promise/sure/sessions/efba0c75-5f82-41a1-b618-532d38e222da Co-authored-by: jjmata <187772+jjmata@users.noreply.github.com>
20 lines
468 B
Ruby
20 lines
468 B
Ruby
class Settings::PaymentsController < ApplicationController
|
|
layout "settings"
|
|
|
|
guard_feature unless: -> { Current.family.can_manage_subscription? }
|
|
|
|
def show
|
|
@family = Current.family
|
|
@one_time_contribution_url = stripe&.payment_link_url(payment_link_id:) if payment_link_id.present?
|
|
end
|
|
|
|
private
|
|
def payment_link_id
|
|
ENV["STRIPE_PAYMENT_LINK_ID"]
|
|
end
|
|
|
|
def stripe
|
|
@stripe ||= Provider::Registry.get_provider(:stripe)
|
|
end
|
|
end
|