Unverified Commit 5db2860c authored by Darsh Patel's avatar Darsh Patel Committed by GitHub

add payment description for with-stripe-typescript (#15888)

parent fce1830d
...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
# https://dashboard.stripe.com/apikeys # https://dashboard.stripe.com/apikeys
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_12345 NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_12345
STRIPE_SECRET_KEY=sk_12345 STRIPE_SECRET_KEY=sk_12345
STRIPE_PAYMENT_DESCRIPTION='Software development services'
# https://stripe.com/docs/webhooks/signatures # https://stripe.com/docs/webhooks/signatures
STRIPE_WEBHOOK_SECRET=whsec_1234 STRIPE_WEBHOOK_SECRET=whsec_1234
...@@ -25,6 +25,7 @@ export default async function handler( ...@@ -25,6 +25,7 @@ export default async function handler(
payment_method_types: ['card'], payment_method_types: ['card'],
amount: formatAmountForStripe(amount, CURRENCY), amount: formatAmountForStripe(amount, CURRENCY),
currency: CURRENCY, currency: CURRENCY,
description: process.env.STRIPE_PAYMENT_DESCRIPTION ?? '',
} }
const payment_intent: Stripe.PaymentIntent = await stripe.paymentIntents.create( const payment_intent: Stripe.PaymentIntent = await stripe.paymentIntents.create(
params params
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment