0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

Renamed addCustomerToMember to updateCustomer

no-issue
This commit is contained in:
Fabien O'Carroll 2019-10-08 14:31:50 +07:00
parent 8829b545a9
commit 6fc6718735

View file

@ -163,7 +163,7 @@ module.exports = class StripePaymentProcessor {
}
async handleCheckoutSessionCompletedWebhook(member, customer) {
await this._addCustomerToMember(member, customer);
await this._updateCustomer(member, customer);
if (!customer.subscriptions || !customer.subscriptions.data) {
return;
}
@ -194,7 +194,7 @@ module.exports = class StripePaymentProcessor {
await this._updateSubscription(subscription);
}
async _addCustomerToMember(member, customer) {
async _updateCustomer(member, customer) {
debug(`Attaching customer to member ${member.email} ${customer.id}`);
await this.storage.set({
customer: {
@ -247,7 +247,7 @@ module.exports = class StripePaymentProcessor {
email: member.email
});
await this._addCustomerToMember(member, customer);
await this._updateCustomer(member, customer);
return customer;
}