mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Improve conditional in raise_if_not_in_capture_state
This commit is contained in:
@@ -139,7 +139,7 @@ module Spree
|
||||
|
||||
def raise_if_not_in_capture_state(payment_intent_response)
|
||||
state = payment_intent_response.status
|
||||
return unless state != 'requires_capture'
|
||||
return if state == 'requires_capture'
|
||||
|
||||
raise Stripe::StripeError, I18n.t(:invalid_payment_state, state: state)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user