From 986d068e28f64eafde39bd3f688cfae2e99fdf3b Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Thu, 10 Jun 2021 10:33:41 +0100 Subject: [PATCH] Add #stripe_captured? method to Payment --- app/models/spree/payment.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/spree/payment.rb b/app/models/spree/payment.rb index 1990778eaa..8ad498080d 100644 --- a/app/models/spree/payment.rb +++ b/app/models/spree/payment.rb @@ -164,6 +164,10 @@ module Spree Stripe::PaymentIntentValidator.new.call(self).status end + def stripe_captured? + stripe_status == "succeeded" + end + def clear_authorization_url update_attribute(:cvv_response_message, nil) end