payments
This commit is contained in:
parent
f0d9af3811
commit
e170be5aa8
|
@ -11,16 +11,11 @@ const getStripeCustomer = async (user, authorization) => {
|
||||||
return stripe.customers.retrieve(user.stripeCustomerId);
|
return stripe.customers.retrieve(user.stripeCustomerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
const customer = stripe.customers.create();
|
const customer = await stripe.customers.create();
|
||||||
|
|
||||||
console.log(customer);
|
|
||||||
console.log(user);
|
|
||||||
|
|
||||||
// update user instance and include the customer id once created
|
// update user instance and include the customer id once created
|
||||||
await got.put(`http://accounts:3000/user`, { headers: { authorization }, json: { stripeCustomerId: customer.id } });
|
await got.put(`http://accounts:3000/user`, { headers: { authorization }, json: { stripeCustomerId: customer.id } });
|
||||||
|
|
||||||
console.log("---");
|
|
||||||
|
|
||||||
return customer;
|
return customer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Reference in New Issue