pgeu / pgeu-system

Mirror of the PostgreSQL Europe Conference and Membership management system.
MIT License
20 stars 28 forks source link

error processing stripe refund webhook #156

Closed ssinger closed 8 months ago

ssinger commented 8 months ago

The stripe refund webhook is failing

line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "./postgresqleu/util/decorators.py", line 26, in wrapped_view
    return view_func(request, *args, **kwargs)
  File "./postgresqleu/stripepayment/views.py", line 175, in webhook
    for r in payload['data']['object']['refunds']['data']:

Exception Type: KeyError at /p/stripe/1/webhook/
Exception Value: 'refunds'
Request information:
USER: AnonymousUser

https://docs.stripe.com/upgrades#2022-11-15 says

Charge no longer auto-expands refunds by default. You can expand the list but for performance reasons we recommended against doing so unless needed.