Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
5db2860c
Unverified
Commit
5db2860c
authored
Aug 05, 2020
by
Darsh Patel
Committed by
GitHub
Aug 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add payment description for with-stripe-typescript (#15888)
parent
fce1830d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
.env.local.example
examples/with-stripe-typescript/.env.local.example
+1
-0
index.ts
...with-stripe-typescript/pages/api/payment_intents/index.ts
+1
-0
No files found.
examples/with-stripe-typescript/.env.local.example
View file @
5db2860c
...
@@ -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
examples/with-stripe-typescript/pages/api/payment_intents/index.ts
View file @
5db2860c
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment