From d8218a6243df5358dca20a12a6f6002c3469e336 Mon Sep 17 00:00:00 2001 From: alannnc Date: Wed, 12 Apr 2023 22:27:54 -0700 Subject: [PATCH] Fix payment app credential search (#8235) --- packages/features/bookings/lib/handleNewBooking.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index d529abeccc..ea839c1ba1 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -1582,11 +1582,10 @@ async function handler( } if (typeof paymentAppData.price === "number" && paymentAppData.price > 0) { - /* Validate if there is any stripe_payment credential for this user */ - /* note: removes custom error message about stripe */ + /* Validate if there is any payment app credential for this user */ await prisma.credential.findFirstOrThrow({ where: { - type: "stripe_payment", + appId: paymentAppData.appId, userId: organizerUser.id, }, select: {