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:
parent
8829b545a9
commit
6fc6718735
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue