app/webhooks.rb: halt for nil customer

This commit is contained in:
Kyle Drake 2017-02-15 20:32:12 -08:00
parent ba628805bd
commit 3bb3312831

View file

@ -107,7 +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
halt '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