File tree Expand file tree Collapse file tree
apps/web/app/(ee)/api/stripe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export async function invoicePaid(event: Stripe.Event) {
1919 const stripeCustomerId = invoice . customer as string ;
2020 const invoiceId = invoice . id ;
2121
22- // Find customer using projectConnectId and stripeCustomerId
22+ // Find customer using stripeCustomerId
2323 let customer = await prisma . customer . findUnique ( {
2424 where : {
2525 stripeCustomerId,
Original file line number Diff line number Diff line change @@ -38,10 +38,9 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {
3838 const plan = getPlanFromPriceId ( priceId ) ;
3939
4040 if ( ! plan ) {
41- await log ( {
42- message : `Invalid price ID in checkout.session.completed event: ${ priceId } ` ,
43- type : "errors" ,
44- } ) ;
41+ console . log (
42+ `Invalid price ID in checkout.session.completed event: ${ priceId } ` ,
43+ ) ;
4544 return ;
4645 }
4746
Original file line number Diff line number Diff line change 11import { deleteWorkspaceFolders } from "@/lib/api/folders/delete-workspace-folders" ;
22import { webhookCache } from "@/lib/webhook/cache" ;
33import { prisma } from "@dub/prisma" ;
4- import { getPlanFromPriceId , log } from "@dub/utils" ;
4+ import { getPlanFromPriceId } from "@dub/utils" ;
55import { NextResponse } from "next/server" ;
66import Stripe from "stripe" ;
77import { sendCancellationFeedback } from "./utils" ;
@@ -13,10 +13,9 @@ export async function customerSubscriptionUpdated(event: Stripe.Event) {
1313 const plan = getPlanFromPriceId ( priceId ) ;
1414
1515 if ( ! plan ) {
16- await log ( {
17- message : `Invalid price ID in customer.subscription.updated event: ${ priceId } ` ,
18- type : "errors" ,
19- } ) ;
16+ console . log (
17+ `Invalid price ID in customer.subscription.updated event: ${ priceId } ` ,
18+ ) ;
2019 return ;
2120 }
2221
You can’t perform that action at this time.
0 commit comments