#BinaryWritter - bugs
1 messages ยท Page 1 of 1 (latest)
hello, this is one of them, it appears this message when i run the web site
I have also bugs when i click Checkout button, Stripe dashboard says checkout its not completed
I don't see any Stripe calls in that stack. Did you see some stripe code throw an error or something when debugging?
It looks like something there is undefined. Have you debugged to check that response and response.id are defined as you expect them?
Here it is the component when that error is comming from
But dont know how to fix it
Do you know how to debug your javascript? I would reccommend putting a breakpoint on your code that fetches this info from your server
It sounds like either your server is not sending back the data you expect, in which case you will need to debug the server code. Or something is happening on your client side after the server has responded
Unfortunately I can't tell just from looking at that code
I have placed a console log in the response.id and yes it throws a id
Dont know how to explain you about the bugs
Do you want to see the response.id data?
I have this in console
A non-serializable value was detected in an action, in the path: register. Value: [Function: register]
Take a look at the logic that dispatched this action: {
type: 'persist/PERSIST',
register: [Function: register],
rehydrate: [Function: rehydrate]
}
What is the ID that you get back in your response?
SessionId : cs_test_b1lHV3it2XFVVIbYOVs1Npe04OOtt0e4ja8p28zVp2V6uAzJ14AUK5KfVO
Thank you
๐ @normal falcon Pompey had to step away earlier. Are you still around and needing help on this? If so I'm happy to look
Hello @shadow vapor the problem i think i have seems to be more complicated than i thought because i grabbed the code from a vercel/stripe example, but the typescript doesnt work very well in next.js
The code has errors in short
I haven't read the whole thread, are the errors above or could you summarize for me?
Yes, lots of them, im tired of fixing them and reading the documentation
For example here
import React from 'react'
type Props = {
content: object
}
const PrintObject = ({content}:Props) => {
const formattedContent: string = JSON.stringify(content, null, 2)
return <pre>{formattedContent}</pre>
}
export default PrintObject
It throws a error parsing error unexpected token Props
None of that is Stripe specific though, no?
Yes because is for a checkout with typescript there is returning a Json with all store data
But im not a expert in Typescript
The content: object is the Checkout Session object?
I think its what the json is returning but they want it to be formatted