mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove unused argument from ProcessPaymentIntent
This commit is contained in:
@@ -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!
|
||||
|
||||
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user