This commit is contained in:
Emily
2024-06-04 15:36:57 +02:00
parent 0427827858
commit c151d558f4
6 changed files with 101 additions and 25 deletions

View File

@@ -29,6 +29,7 @@ export default defineEventHandler(async event => {
const checkout = await StripeService.cretePayment(
price,
'https://dashboard.litlyx.com/payment_ok',
project_id,
project.customer_id
);
@@ -37,9 +38,6 @@ export default defineEventHandler(async event => {
return setResponseStatus(event, 400, 'Cannot create payment');
}
const customer = checkout.customer;
await ProjectModel.updateOne({ _id: project_id }, { customer_id: customer });
return checkout.url;
});