Add :void scope in Spree::Payment

This commit is contained in:
Ana Nunes da Silva
2023-02-06 11:32:43 +00:00
parent b48b3ad42b
commit f2b407c194

View File

@@ -51,6 +51,7 @@ module Spree
scope :pending, -> { with_state('pending') }
scope :failed, -> { with_state('failed') }
scope :valid, -> { where.not(state: %w(failed invalid)) }
scope :void, -> { with_state('void') }
scope :authorization_action_required, -> { where.not(cvv_response_message: nil) }
scope :requires_authorization, -> { with_state("requires_authorization") }
scope :with_payment_intent, ->(code) { where(response_code: code) }