Skip to content

Commit

Permalink
Standardize
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Aug 17, 2023
1 parent 2e52881 commit 58efd12
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/pay/stripe/billable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,14 @@ def checkout(**options)
customer unless processor_id?
args = {
customer: processor_id,
mode: "payment",
mode: "payment"
}

# Embedded checkouts cannot use URLs
args.merge!(
# These placeholder URLs will be replaced in a following step.
success_url: merge_session_id_param(options.delete(:success_url) || root_url),
cancel_url: merge_session_id_param(options.delete(:cancel_url) || root_url)
) if options[:ui_mode] != "embedded"
if options[:ui_mode] != "embedded"
args[:success_url] = merge_session_id_param(options.delete(:success_url) || root_url)
args[:cancel_url] = merge_session_id_param(options.delete(:cancel_url) || root_url)
end

# Line items are optional
if (line_items = options.delete(:line_items))
Expand Down

0 comments on commit 58efd12

Please sign in to comment.