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

Revert "Removed unused upsertCustomer method"

This reverts commit b261c1d61e06e35657741de888fd651329101d69.
upsertCustomer method is used to overwrite customer when checkout session is completed.
This commit is contained in:
Rish 2021-02-12 16:47:26 +05:30 committed by Fabien O'Carroll
parent 94301e3c17
commit b8a17f2be0

View file

@ -119,6 +119,15 @@ module.exports = class MemberRepository {
}, options);
}
async upsertCustomer(data) {
return await this._StripeCustomer.upsert({
customer_id: data.customer_id,
member_id: data.member_id,
name: data.name,
email: data.email
});
}
async linkStripeCustomer(data, options) {
if (!this._stripeAPIService.configured) {
throw new Error('Cannot link Stripe Customer with no Stripe Connection');