From b517d2f0c769dfb40cabc2b0ffdd92bde656e517 Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Tue, 27 Oct 2020 14:39:20 -0700 Subject: [PATCH] guard against a stripe customer already being deleted --- app/controllers/spree/credit_cards_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/spree/credit_cards_controller.rb b/app/controllers/spree/credit_cards_controller.rb index bd623d4154..1c3f6b0aa6 100644 --- a/app/controllers/spree/credit_cards_controller.rb +++ b/app/controllers/spree/credit_cards_controller.rb @@ -65,7 +65,7 @@ module Spree def destroy_at_stripe stripe_customer = Stripe::Customer.retrieve(@credit_card.gateway_customer_profile_id, {}) - stripe_customer&.delete + stripe_customer&.delete unless stripe_customer.deleted? end def stripe_account_id