Extract and stub PaymentMethodFetcher

This commit is contained in:
Matt-Yorkley
2022-01-20 10:36:12 +00:00
parent ebb69d7f93
commit 8552da2377
4 changed files with 53 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ class SplitCheckoutController < ::BaseController
end
def selected_payment_method
@selected_payment_method ||= @order.payments.order(:created_at).last&.payment_method
@selected_payment_method ||= Checkout::PaymentMethodFetcher.new(@order).call
end
def update_order