mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-13 10:55:58 +03:00
Added method for linking customer to member
no-issue Uses the metadata storage passed into stripe
This commit is contained in:
parent
9beb496bd1
commit
69abbc6fa2
@ -75,6 +75,13 @@ module.exports = class StripePaymentProcessor {
|
||||
return session;
|
||||
}
|
||||
|
||||
async addCustomerToMember(member, customer) {
|
||||
const metadata = await this.storage.get(member);
|
||||
return this.storage.set(member, metadata.concat({
|
||||
customer_id: customer.id
|
||||
}));
|
||||
}
|
||||
|
||||
async getCustomer(id) {
|
||||
return retrieve(this._stripe, 'customers', id);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user