Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function invoicePaid(event: Stripe.Event) {
const stripeCustomerId = invoice.customer as string;
const invoiceId = invoice.id;

// Find customer using projectConnectId and stripeCustomerId
// Find customer using stripeCustomerId
let customer = await prisma.customer.findUnique({
where: {
stripeCustomerId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ export async function checkoutSessionCompleted(event: Stripe.Event) {
const plan = getPlanFromPriceId(priceId);

if (!plan) {
await log({
message: `Invalid price ID in checkout.session.completed event: ${priceId}`,
type: "errors",
});
console.log(
`Invalid price ID in checkout.session.completed event: ${priceId}`,
);
return;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { deleteWorkspaceFolders } from "@/lib/api/folders/delete-workspace-folders";
import { webhookCache } from "@/lib/webhook/cache";
import { prisma } from "@dub/prisma";
import { getPlanFromPriceId, log } from "@dub/utils";
import { getPlanFromPriceId } from "@dub/utils";
import { NextResponse } from "next/server";
import Stripe from "stripe";
import { sendCancellationFeedback } from "./utils";
Expand All @@ -13,10 +13,9 @@ export async function customerSubscriptionUpdated(event: Stripe.Event) {
const plan = getPlanFromPriceId(priceId);

if (!plan) {
await log({
message: `Invalid price ID in customer.subscription.updated event: ${priceId}`,
type: "errors",
});
console.log(
`Invalid price ID in customer.subscription.updated event: ${priceId}`,
);
return;
}

Expand Down