Remove unused argument from ProcessPaymentIntent

This commit is contained in:
Matt-Yorkley
2021-05-16 22:19:01 +01:00
parent 381b0e78d5
commit 8429da3d2a
2 changed files with 3 additions and 3 deletions

View File

@@ -23,10 +23,10 @@ class ProcessPaymentIntent
end
end
def initialize(payment_intent, order, last_payment = nil)
def initialize(payment_intent, order)
@payment_intent = payment_intent
@order = order
@last_payment = last_payment.presence || OrderPaymentFinder.new(order).last_payment
@last_payment = OrderPaymentFinder.new(order).last_payment
end
def call!

View File

@@ -157,7 +157,7 @@ describe ProcessPaymentIntent do
context "when the payment can't be completed" do
let(:intent) { "pi_123" }
let(:intent_response) { double(id: "pi_123", status: "requires_capture") }
let(:service) { ProcessPaymentIntent.new(intent, order, payment) }
let(:service) { ProcessPaymentIntent.new(intent, order) }
before do
allow(order).to receive(:process_payments!) { nil }