Skip to content

Commit

Permalink
fix(integration): 🐛 Payment receipt email parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed May 31, 2022
1 parent a9f730b commit 797ff18
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
: stripeKeys.live.secretKey,
{ apiVersion: '2020-08-27' }
)
console.log(variables, inputOptions)
const amount = Math.round(
Number(parseVariables(variables)(inputOptions.amount)) * 100
)
Expand All @@ -62,7 +61,9 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
const paymentIntent = await stripe.paymentIntents.create({
amount,
currency: inputOptions.currency,
receipt_email: inputOptions.additionalInformation?.email,
receipt_email: parseVariables(variables)(
inputOptions.additionalInformation?.email
),
automatic_payment_methods: {
enabled: true,
},
Expand Down

4 comments on commit 797ff18

@vercel
Copy link

@vercel vercel bot commented on 797ff18 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 797ff18 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

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

@vercel
Copy link

@vercel vercel bot commented on 797ff18 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 797ff18 May 31, 2022

Please sign in to comment.