#Paddy - Terminal

1 messages · Page 1 of 1 (latest)

scarlet halo
#

Hello! Can you move your other messages into this thread so we can keep all the context in one place?

visual karma
#

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

scarlet halo
#

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?

visual karma
#

looks like its strictly our back end/server code

scarlet halo
#

Strictly? Why do you say that? Are there error logs on the server that reveal anything?

visual karma
#

because on the client side javascript logs there are no errors

#

its just the back end logs of returning the capture payment state

scarlet halo
#

What's calling POST /capture_payment_intent?

gray oxide
#

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

scarlet halo
#

I think you'd need something like response.charges.data[0].captured since data is an array (but my Python is rusty)?

gray oxide
#

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

scarlet halo
#

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?

gray oxide
#

No i was trying to turn it into json

scarlet halo
#

You should not need to do that.

gray oxide
#

realised that now