Skip to content

Commit

Permalink
add clg statements to monitor priceId
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratchet7x5 committed Dec 12, 2024
1 parent 662ae7b commit 866a6cc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/controller/stripeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ const endpointSecret: string = process.env.STRIPE_WEBHOOK_ENDPOINT as string;

export const createCheckout = asyncHandler(
async (req: Request, res: Response) => {
console.log("createCheckout: req.body", req.body);
const { priceId, userTicketId } = req.body;
console.log("createCheckout: priceId: " + priceId);
console.log("createCheckout: userTicketId: " + userTicketId);
const session = req.session!;
let email;

Expand All @@ -29,6 +30,10 @@ export const createCheckout = asyncHandler(
email = undefined;
}

console.log(
"createCheckout: priceId Check: priceId === undefined || priceId === ",
priceId === undefined || priceId === ""
);
// if priceId is undefined, send a 404 back.
if (priceId === undefined || priceId === "") {
return res
Expand Down

0 comments on commit 866a6cc

Please sign in to comment.