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

Error on parsing request body - querystring needed! #1

Open
wagnertimo opened this issue Dec 7, 2018 · 0 comments
Open

Error on parsing request body - querystring needed! #1

wagnertimo opened this issue Dec 7, 2018 · 0 comments

Comments

@wagnertimo
Copy link

Hi Aleksandar,

thank you for this boilerplate!
But there is a problem with the payment template. The generated code does not work by default due to the request.body problem (which is undefined). This issue you already stated in your youtube video (https://www.youtube.com/watch?v=OGdcfF5YN94&frags=pl%2Cwn).

I added the const qs = require(querystring); as you noted in the youtube video and defined the body variable as let body = qs.parse(request.body); and then ... source: body.stripeToken, ....

I also have to manually set the other charge attributes in the stripe api request, since the body only consists of stripeToken, stripeTokenType and stripeEmail (but no amount or currency attribute).

Could you please updated this? And give any hint on how to deal with getting the amount and currency from the "stripe frontend" (so no manual settings in backend is needed)?

Thank you!

Best regards,
Timo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant