Improve #stripe_status return value for failed actions

This commit is contained in:
Matt-Yorkley
2021-06-10 10:39:38 +01:00
parent 986d068e28
commit dcc808a8b9

View File

@@ -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?