#Physicsbuddy
1 messages · Page 1 of 1 (latest)
Hello, what exactly isn't working? Are you getting an error somewhere?
the problem seems to be here in the payment information passed in to the capture order
the tutorial is a year old so it might be because of that ??
What is happening (or not happening) when you call those functions?
We don't break old code, so the code from a year ago should still work
after filling and entering the card fake 4242 number i don't get emails as the youtube guys gets and also i get this error
What line of code are you getting those after?
Can you send me the text of that code?
Have you debugged this code to see how far it gets before hitting this error?
For client side code, you would typically use your browser's developer tools. You can place breakpoints and step through your code to see what is happening
Can you send the full errors from your developer console here? That might tell us more about where this code is running in to an issue
So most of those look like warnings but this error jumped out at me
:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
react-dom.development.js:463 Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>.
at p
at p
at Typography (http://localhost:3000/static/js/bundle.js:17071:28)
at WithStyles (http://localhost:3000/static/js/bundle.js:20512:31)
at div
at CardContent (http://localhost:3000/static/js/bundle.js:7456:23)
at WithStyles (http://localhost:3000/static/js/bundle.js:20512:31)
at div
at Paper (http://localhost:3000/static/js/bundle.js:13819:23)
at WithStyles (http://localhost:3000/static/js/bundle.js:20512:31)
at Card (http://localhost:3000/static/js/bundle.js:7652:23)
at WithStyles (http://localhost:3000/static/js/bundle.js:20512:31)
at Product (http://localhost:3000/static/js/bundle.js:2446:5)
at div
at Grid (http://localhost:3000/static/js/bundle.js:9205:35)
at WithStyles (http://localhost:3000/static/js/bundle.js:20512:31)
at div
at Grid (http://localhost:3000/static/js/bundle.js:9205:35)
at WithStyles (http://localhost:3000/static/js/bundle.js:20512:31)
at main
at Products (http://localhost:3000/static/js/bundle.js:2665:5)
at RenderedRoute (http://localhost:3000/static/js/bundle.js:68503:5)
at Routes (http://localhost:3000/static/js/bundle.js:68940:5)
at div
at Router (http://localhost:3000/static/js/bundle.js:68878:15)
at BrowserRouter (http://localhost:3000/static/js/bundle.js:67195:5)
at App (http://localhost:3000/static/js/bundle.js:45:82)```
It sounds like your code is reaching out to and endpoint on your server named create-payment-intent and either your server or your client are passing HTML to the other one when it is expecting JSON
Do you see somewhere in your code where you are reaching out to an endpoint named create-payment-intent?
there is no server setup here
no
in the youtube tutorial he didn't use server side
should i send the youtube link pls
This type of integration would need a server somewhere. You can't create payment intents client side. Are you possibly just running a sample server of theirs?
It would also help to double check for some call to create-payment-intent
Unfortunately I don't understand enough of what is going wrong on your side for the tutorial to be helpful here.
i also set up this from stripe official but didn't get the result https://stripe.com/docs/payments/card-element
Unfortunately I can't go through that code and find your issue for you here. You will need to do more debugging to narrow down what is happening.