Skip to content

Commit

Permalink
fix: membership update bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gmat224 committed Dec 22, 2024
1 parent e01ed75 commit d18c4ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/controller/stripeController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,11 @@ export const handleWebhook = asyncHandler(

if (event.type === "checkout.session.completed") {
const session: Stripe.Checkout.Session = event.data.object;

if (
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 d18c4ce

Please sign in to comment.