diff --git a/app/controllers/spree/admin/payments_controller.rb b/app/controllers/spree/admin/payments_controller.rb index 73a7ac7764..ffe0a13b3c 100644 --- a/app/controllers/spree/admin/payments_controller.rb +++ b/app/controllers/spree/admin/payments_controller.rb @@ -3,8 +3,6 @@ module Spree module Admin class PaymentsController < Spree::Admin::BaseController - include FullUrlHelper - before_action :load_order, except: [:show] before_action :load_payment, only: [:fire, :show] before_action :load_data diff --git a/app/helpers/full_url_helper.rb b/app/helpers/full_url_helper.rb deleted file mode 100644 index 8c448f71fb..0000000000 --- a/app/helpers/full_url_helper.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -module FullUrlHelper - def url_helpers - # This is how we can get the helpers with a usable root_url outside the controllers - Rails.application.routes.default_url_options = ActionMailer::Base.default_url_options - Rails.application.routes.url_helpers - end - - def full_checkout_path - URI.join(url_helpers.root_url, url_helpers.checkout_path).to_s - end -end diff --git a/app/models/spree/gateway/stripe_sca.rb b/app/models/spree/gateway/stripe_sca.rb index 29dd5e8b22..5c15fd3429 100644 --- a/app/models/spree/gateway/stripe_sca.rb +++ b/app/models/spree/gateway/stripe_sca.rb @@ -10,8 +10,6 @@ require 'active_merchant/billing/gateways/stripe' module Spree class Gateway class StripeSCA < Gateway - include FullUrlHelper - VOIDABLE_STATES = [ "requires_payment_method", "requires_capture", "requires_confirmation", "requires_action" ].freeze @@ -143,7 +141,7 @@ module Spree def options_for_authorize(money, creditcard, gateway_options) options = basic_options(gateway_options) - options[:return_url] = gateway_options[:return_url] || full_checkout_path + options[:return_url] = gateway_options[:return_url] || payment_gateways_confirm_stripe_url customer_id, payment_method_id = Stripe::CreditCardCloner.new(creditcard, stripe_account_id).find_or_clone