Ghost/ghost/members-api/lib
Fabien 'egg' O'Carroll e7484638e3 Ensured that we do not insert orphaned rows (#190)
no-issue

Previously we would blindly put subscriptions into the database when we
received a webhook, which could result in orphaned rows that were not
linked to a customer (and by extension a member)

This updates the logic so that we will only add subscriptions if we have
a record of their customer.

Customers are only added during a checkout.session.completed webhook, at
which point a member is guarunteed, but for formailty and safety against
changes in the flow, the logic has been applied to inserting customers
too.
2020-07-24 15:39:01 +02:00
..
stripe Handled subscription deletion errors with logging 2020-07-24 13:46:38 +02:00
common.js Added subscription update middleware (#107) 2019-12-12 15:19:36 +07:00
geolocation.js Store geolocation data during member signup/signin (#128) 2020-02-27 10:29:36 +00:00
metadata.js Ensured that we do not insert orphaned rows (#190) 2020-07-24 15:39:01 +02:00
tokens.js Updated members-api to use magic-link 2019-09-03 15:35:04 +08:00
users.js Renamed destroyStripeSubscriptions to cancelStripeSubscriptions 2020-07-24 13:46:38 +02:00