Skip to content

Commit

Permalink
Merge branch 'feat/request-hooks' of https://github.com/UoaWDCC/auis-…
Browse files Browse the repository at this point in the history
…portal into feat/request-hooks
  • Loading branch information
gmat224 committed Dec 22, 2024
2 parents d78501a + bc3c7f7 commit e284d1d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions api/controller/stripeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ export const handleWebhook = asyncHandler(

if (event.type === "checkout.session.completed") {
const session: Stripe.Checkout.Session = event.data.object;
if (!(
!session.metadata &&
!session.metadata!["priceId"] &&
!session.metadata!["isEventTicket"]
)) {
if (
!(
!session.metadata &&
!session.metadata!["priceId"] &&
!session.metadata!["isEventTicket"]
)
) {
if (session.metadata!["isEventTicket"] === "y") {
completeTicketPurchase(session.id);
} else if (session.metadata!["isEventTicket"] === "n") {
Expand Down

0 comments on commit e284d1d

Please sign in to comment.