guard against a stripe customer already being deleted

This commit is contained in:
Andy Brett
2020-10-27 14:39:20 -07:00
parent cc00f24569
commit b517d2f0c7

View File

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