Skip to content

Commit

Permalink
fix(integration): 🐛 Empty receipt email
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed May 31, 2022
1 parent 26cf38f commit 7aa6dab
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
)
if (isNaN(amount)) return badRequest(res)
// Create a PaymentIntent with the order amount and currency
const receiptEmail = parseVariables(variables)(
inputOptions.additionalInformation?.email
)
const paymentIntent = await stripe.paymentIntents.create({
amount,
currency: inputOptions.currency,
receipt_email: parseVariables(variables)(
inputOptions.additionalInformation?.email
),
receipt_email: receiptEmail === '' ? undefined : receiptEmail,
automatic_payment_methods: {
enabled: true,
},
Expand Down

4 comments on commit 7aa6dab

@vercel
Copy link

@vercel vercel bot commented on 7aa6dab May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

app.typebot.io
builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 7aa6dab May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 7aa6dab May 31, 2022

@vercel
Copy link

@vercel vercel bot commented on 7aa6dab May 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.