diff --git a/app/models/spree/order_decorator.rb b/app/models/spree/order_decorator.rb index 28d487d6fd..1cde659f65 100644 --- a/app/models/spree/order_decorator.rb +++ b/app/models/spree/order_decorator.rb @@ -115,6 +115,12 @@ Spree::Order.class_eval do end end + # "Checkout" is the initial state and, for card payments, "pending" is the state after authorization + # These are both valid states to process the payment + def pending_payments + (payments.select(&:pending?) + payments.select(&:checkout?)).uniq + end + def remove_variant(variant) line_items(:reload) current_item = find_line_item_by_variant(variant)