dont 500 for missing customer in stripe webhook

This commit is contained in:
Kyle Drake 2017-02-15 18:24:41 -08:00
parent 13e67fc264
commit 6c939eaa83

View file

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