void transactions in memory instead of fetching from db

Co-authored-by: Maikel <maikel@email.org.au>
This commit is contained in:
Andy Brett
2021-09-23 14:35:47 -07:00
committed by Matt-Yorkley
parent 48a867ac99
commit 0b3d78b2a5

View File

@@ -615,7 +615,7 @@ module Spree
def cancel_payments_requiring_auth
return unless payment_state == "paid"
payments.requires_authorization.each(&:void_transaction!)
payments.to_a.select(&:requires_authorization?).each(&:void_transaction!)
end
def fee_handler