Subscribie / subscribie

Collect recurring payments online - subscription payments collection automation
https://subscribie.co.uk
Mozilla Public License 2.0
56 stars 20 forks source link

As an operator, webhook checkout.session.completed mode 'setup' upon update payment method is handled gracefully #1400

Closed chrisjsimpson closed 2 months ago

chrisjsimpson commented 2 months ago

Is your feature request related to a problem? Please describe.

When subscriber payment details are updated, this suceeds (because payment details are not persisted by subscribie, they are persisted by the payment provider (e.g. stripe), however the webhook does not correctly return 200 causing that webhook type & mode (setup) combination to return a 500 response.

subscribie/blueprints/checkout/__init__.py", line 1059, in stripe_webhook
    currency = session["currency"].upper()
               ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'upper'

Describe the solution you'd like

Handle checkout.session.completed mode type setup events correctly with a 200 response.

Describe alternatives you've considered

Additional context

github-actions[bot] commented 2 months ago

:rocket: Issue was released in v0.1.205 :rocket:

github-actions[bot] commented 2 months ago

:rocket: Issue was released in v0.1.205 :rocket: