mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
dont 500 for missing customer in stripe webhook
This commit is contained in:
parent
13e67fc264
commit
6c939eaa83
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue