Ghost/ghost/members-api/lib
Fabien 'egg' O'Carroll 2fb6708944 🐛 Fixed issues when updating payment method (#247)
refs https://github.com/TryGhost/Team/issues/479

* Fixed updating payment method for canceled subscriptions

Stripe considers canceled subscriptions as non-existent, so any attempts
to update them will fail with a 404 not found. Prior to this change we
were attempting to update *all* subscriptions for a customer, including
those which were canceled. This would cause an error and the loop to
break.

* 🐛 Fixed errors for members with multiple active customers

Members with multiple active customers would have their first active
customer found updated with the new payment method. We would then
iterate through *all* active subscription, and attempt to update their
payment method. If a subscription was not owned by the customer that was
just updated, it would error and cause the loop to break out.

* Added ability to update a specific subscription's payment method

In order to remove ambiguity we add the ability to update the payment
method for a specific subscription. This will remove room for errors as
we will not have to worry about if a subscription belong to the customer
or not.
2021-02-23 11:19:21 +00:00
..
controllers/router 🐛 Fixed issues when updating payment method (#247) 2021-02-23 11:19:21 +00:00
repositories/member 🐛 Fixed comp plans for members w/ active subscriptions 2021-02-22 14:00:24 +00:00
services 🐛 Fixed issues when updating payment method (#247) 2021-02-23 11:19:21 +00:00
common.js Added subscription update middleware (#107) 2019-12-12 15:19:36 +07:00