Skip to content

Commit

Permalink
chore: only fulfill paid orders
Browse files Browse the repository at this point in the history
  • Loading branch information
altaywtf committed Dec 16, 2023
1 parent aa2b237 commit d853f5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/api/webhooks/stripe/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ export async function POST(req: NextRequest) {
},
);

await fulfillOrder(session);
if (session.payment_status === 'paid') {
await fulfillOrder(session);
}

break;
}

Expand Down

0 comments on commit d853f5f

Please sign in to comment.