mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-05 02:41:33 +00:00
Fix simple Rubocop issues
This commit is contained in:
@@ -188,7 +188,6 @@ module Spree
|
||||
# is used by the gateway.
|
||||
def invalidate_old_payments
|
||||
order.payments.with_state('checkout').where("id != ?", id).each do |payment|
|
||||
|
||||
# Using update_column skips validations and so it skips validate_source. As we are just
|
||||
# invalidating past payments here, we don't want to validate all of them at this stage.
|
||||
payment.update_column(:state, 'invalid')
|
||||
|
||||
@@ -147,13 +147,15 @@ module Spree
|
||||
record_response(response)
|
||||
|
||||
if response.success?
|
||||
self.class.create!(order: order,
|
||||
source: self,
|
||||
payment_method: payment_method,
|
||||
amount: refund_amount.abs * -1,
|
||||
response_code: response.authorization,
|
||||
state: 'completed',
|
||||
skip_source_validation: true)
|
||||
self.class.create!(
|
||||
order: order,
|
||||
source: self,
|
||||
payment_method: payment_method,
|
||||
amount: refund_amount.abs * -1,
|
||||
response_code: response.authorization,
|
||||
state: 'completed',
|
||||
skip_source_validation: true
|
||||
)
|
||||
else
|
||||
gateway_error(response)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user