2020-10-13 02:09:09 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module SubscriptionPortal
|
|
|
|
def self.default_subscriptions_url
|
|
|
|
::Gitlab.dev_or_test_env? ? 'https://customers.stg.gitlab.com' : 'https://customers.gitlab.com'
|
|
|
|
end
|
|
|
|
|
2021-04-13 14:11:28 -04:00
|
|
|
def self.subscriptions_url
|
|
|
|
ENV.fetch('CUSTOMER_PORTAL_URL', default_subscriptions_url)
|
|
|
|
end
|
2021-05-07 08:10:27 -04:00
|
|
|
|
|
|
|
def self.payment_form_url
|
|
|
|
"#{self.subscriptions_url}/payment_forms/cc_validation"
|
|
|
|
end
|
2020-10-13 02:09:09 -04:00
|
|
|
end
|
|
|
|
end
|
2021-04-13 14:11:28 -04:00
|
|
|
|
2021-05-05 08:10:33 -04:00
|
|
|
Gitlab::SubscriptionPortal.prepend_mod
|
2021-04-13 14:11:28 -04:00
|
|
|
Gitlab::SubscriptionPortal::SUBSCRIPTIONS_URL = Gitlab::SubscriptionPortal.subscriptions_url.freeze
|
2021-05-07 08:10:27 -04:00
|
|
|
Gitlab::SubscriptionPortal::PAYMENT_FORM_URL = Gitlab::SubscriptionPortal.payment_form_url.freeze
|