Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[example] Upgrade the with-stripe-typescript example app #33761

Conversation

hideokamoto-stripe
Copy link
Contributor

Hi team!
I found in the with-stripe-typescript example that I need to update these things.

  • use-shopping-cart is launched a new major version
  • Stripe launched a new useful payment element named Stripe Payment Element

So I've updated the example app to support these updates.

Documentation / Examples

  • Make sure the linting passes by running yarn lint

How to test it

Please check the README.md of the example.
https://github.com/vercel/next.js/blob/canary/examples/with-stripe-typescript/README.md

Thanks!

@ijjk ijjk added the examples Issue/PR related to examples label Jan 28, 2022
const { error } = await stripe!.confirmPayment({
elements,
confirmParams: {
return_url: 'http://localhost:3000/donate-with-elements',
Copy link
Member

Choose a reason for hiding this comment

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

Should this be hard coded to localhost?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a URL of the redirect destination.
So if we can set the current page url, we don't have to hard code it.
eg.)

return_url: window && window.location ? [location.protocol, location.hostname,'donate-with-elements'].join('/') ; 'http://localhost:3000/donate-with-elements'

But, it this example works well in SSG/SSR mode?
That's my worrying.

@kodiakhq kodiakhq bot merged commit 2ec2bec into vercel:canary Jan 28, 2022
natew pushed a commit to natew/next.js that referenced this pull request Feb 16, 2022
Hi team!
I found in the `with-stripe-typescript` example that I need to update these things.

- `use-shopping-cart` is launched a new major version
- Stripe launched a new useful payment element named Stripe Payment Element

So I've updated the example app to support these updates.

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`

## How to test it

Please check the README.md of the example.
https://github.com/vercel/next.js/blob/canary/examples/with-stripe-typescript/README.md

Thanks!
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants