#karamhelmi12
1 messages · Page 1 of 1 (latest)
Hi let's chat in this thread @upbeat oriole
hey thank you
clientSecret: intent,```
looks like you only pass the intent and not the client secret here. Why?
sorry i forgot to change it back, i was having the issue when i was sending intent.clientsecret
so when i send intent.clientsecret i don't get the clientsecret in the client side
When you log intent.clientsecret, what do you get?
i am rebooting the app two seconds
i do get the following {requiresAction: true,
status: requires_action}
i just don't get the clientsecret
So it's just missing that param entirely?
yeah
i am thinking i should be getting null or something maybe
but i just don't get anything at all
the value i recieve from the server is at the very bottom
Hi 👋
I'm stepping in as @regal pilot needs to go soon. It looks like your generateResponse function is not returning all the data you expect. Can you try adding some logging there to make sure you are getting the intent object you expect?
I would log the whole intent to see if it has the properties you are trying to reference.
okay two seconds
i am using firebase cloud functions and i am trying to figure out where i can see the output of the console.log()
i never really used cloud functions before
I do not have experience with firebase functions either. However, based on the output it looks like the only value being retunred by your function is the one you hard-coded
Which suggests to me the intent is not getting passed
this is what i get when i send the entire intent to through my console
i can pass the intent however just not the clientsecret
Okay so if you look at what is being returned for clientSecret it looks like the whole Payment Intent data is assigned to that key for some reason
i did think that it's weird
but here where it makes my brain go in knots
i can't use the clientsecret id that is printed
Yeah it seems like the response is getting kind of mangled but first try returning the intent.clientSecret.clientSecret?
okay two seconds
i get this
even when i tried intent.clientsecret.id i get the same error
Hmmm... okay. So I think you will want to look at the intent before it gets to generateResponse.
okay now i am getting the whole thing properly
but i still need to do the generateResponse() helper method so i return the right value. do you know how i can still have the method but also avoiding the problem
I don't know off the top of my head. But you can see that you have the data in the right shape now so try passing it to the generateResponse function and see if you can access the clientSecret.
okay
your help is very much appreciated, thank you very much
hope you have a wonderful day!
Thanks! I hope you can get it working soon.