mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Improve #stripe_status return value for failed actions
This commit is contained in:
@@ -162,6 +162,10 @@ module Spree
|
||||
return if response_code.blank?
|
||||
|
||||
Stripe::PaymentIntentValidator.new.call(self).status
|
||||
rescue Stripe::StripeError
|
||||
# The Stripe::PaymentIntentValidator will raise an error if the Stripe API call indicates
|
||||
# the last attempted action on the payment intent failed.
|
||||
"failed"
|
||||
end
|
||||
|
||||
def stripe_captured?
|
||||
|
||||
Reference in New Issue
Block a user