#Paddy - Terminal
1 messages · Page 1 of 1 (latest)
Hello! Can you move your other messages into this thread so we can keep all the context in one place?
Happy days no problem
this is the error coming up
we need to send the success of the capture payment back to the back end to trigger another page but not having any luck
Looks like you're getting a 500 error response from your backend because the JSON you're sending doesn't match the expected data format.
Can you determine if the issue is with your client-side code or your server-side code?
looks like its strictly our back end/server code
Strictly? Why do you say that? Are there error logs on the server that reveal anything?
because on the client side javascript logs there are no errors
its just the back end logs of returning the capture payment state
What's calling POST /capture_payment_intent?
I am working on this lol
basically, the problem i have is pulling the value from the stripe object
so i am trying to get the value of captured
in python the code i assumed would be response.charges.data.captured
I think you'd need something like response.charges.data[0].captured since data is an array (but my Python is rusty)?
Yeah thats what i thought i missed the 0 lol
Running that now hopefully it will work.
Also been a while since i used python
The error indicates you're dealing with a PaymentIntent instead of the JSON your code expects. Are you trying to use the Payment Intent object from the Stripe API/library as if it was JSON?
No i was trying to turn it into json
You should not need to do that.
realised that now