From 6c939eaa83a71c0db8f7a0b7f24ecbd215896f77 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Wed, 15 Feb 2017 18:24:41 -0800 Subject: [PATCH] dont 500 for missing customer in stripe webhook --- app/webhooks.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/webhooks.rb b/app/webhooks.rb index 25a3662e..88a70556 100644 --- a/app/webhooks.rb +++ b/app/webhooks.rb @@ -107,6 +107,7 @@ end def stripe_get_site_from_event(event) customer_id = event['data']['object']['customer'] + return 'ok' if customer_id.nil? # Likely a fraudulent card report customer = Stripe::Customer.retrieve customer_id # Some old accounts only have a username for the desc