mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #6523 from arku/fix/credit-card-clone-destroyer
Handle nil stripe customer in credit card clone removal logic
This commit is contained in:
@@ -16,8 +16,8 @@ module Stripe
|
||||
Stripe::CreditCardCloneFinder.new(card, stripe_account).find_cloned_card
|
||||
next unless customer_id
|
||||
|
||||
customer = Stripe::Customer.retrieve(customer_id, stripe_account: stripe_account)
|
||||
customer&.delete unless customer.deleted?
|
||||
stripe_customer = Stripe::Customer.retrieve(customer_id, stripe_account: stripe_account)
|
||||
stripe_customer.delete if stripe_customer && !stripe_customer.deleted?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user