Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions app/controllers/white_label_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
# After the signer saves a card on Stripe, the `setup_intent.succeeded` webhook
# calls WhiteLabel::ActivateService, which creates the subscription. So this
# controller never touches billing directly — it only captures consent + a card.
#
# ApplicationController is ActionController::API (no HTML rendering) and every
# interpolated value is escaped via ERB::Util.html_escape, so the two Rails cops
# below are intentionally disabled for this trusted-markup controller.
# rubocop:disable Rails/ApplicationController, Rails/OutputSafety
class WhiteLabelController < ActionController::Base
skip_forgery_protection

Expand Down Expand Up @@ -89,15 +94,16 @@ def render_status(agreement)

def render_accepted_without_card
body = '<h1>Thank you</h1><p class="lead">Your acceptance has been recorded. ' \
'We will email you a secure link to add your payment method shortly.</p>'
"We will email you a secure link to add your payment method shortly.</p>"
render html: layout(body).html_safe
end

def render_invalid
render html: layout('<h1>Link expired or invalid</h1><p class="lead">This acceptance ' \
'link is no longer valid. Please contact your Flobyte representative for a new link.</p>').html_safe,
"link is no longer valid. Please contact your Flobyte representative for a new link.</p>").html_safe,
status: :not_found
end
# rubocop:enable Rails/ApplicationController, Rails/OutputSafety

# Read a versioned legal doc, stripping the leading HTML comment header.
def doc_body(kind, version)
Expand Down
Loading