This commit is contained in:
Karol Wypchlo 2021-03-04 14:52:13 +01:00
parent f0d9af3811
commit e170be5aa8
1 changed files with 1 additions and 6 deletions

View File

@ -11,16 +11,11 @@ const getStripeCustomer = async (user, authorization) => {
return stripe.customers.retrieve(user.stripeCustomerId);
}
const customer = stripe.customers.create();
console.log(customer);
console.log(user);
const customer = await stripe.customers.create();
// update user instance and include the customer id once created
await got.put(`http://accounts:3000/user`, { headers: { authorization }, json: { stripeCustomerId: customer.id } });
console.log("---");
return customer;
};