Back

How to send and receive function data.

  • 0
  • Functions
🍜Udon🍜
9 Jun, 2023, 16:16

All my appwrite cloud variables

TL;DR
User is trying to send and receive function data. They initially had a working version that didn't use functions, but when they ran the same code server-side, it didn't complete the payment and didn't give them the subscriptionId. They are seeking help in troubleshooting the issue and asking for advice on their code and logs. They mention the possibility of a firewall issue but are uncertain. Ultimately, they give up and decide to go back to the in-client solution that works. Solution: No solution is mentioned in the thread.
Binyamin
9 Jun, 2023, 16:17

So what are you actually trying to do?

🍜Udon🍜
9 Jun, 2023, 16:17

Endpoints, function project ids

🍜Udon🍜
9 Jun, 2023, 16:17

I'm trying to get a subscriptionId

🍜Udon🍜
9 Jun, 2023, 16:18

Everything works normally but I'm trying to handle payment on the cloud

Binyamin
9 Jun, 2023, 16:19

I see, As long the payment handling process is just a REST requests, it should work.

🍜Udon🍜
9 Jun, 2023, 16:22

Weird

🍜Udon🍜
9 Jun, 2023, 16:22

Not sure what to do

Binyamin
9 Jun, 2023, 16:25

Are you getting the results you wants from here?

🍜Udon🍜
9 Jun, 2023, 16:29

Nope

🍜Udon🍜
9 Jun, 2023, 16:30

Those are only function variables, maybe I need to add some urls to my firewall?

Binyamin
9 Jun, 2023, 16:30

So what you get back?

🍜Udon🍜
9 Jun, 2023, 16:31

I get my function variables

🍜Udon🍜
9 Jun, 2023, 16:32

Like api key, endpoint, project id

ideclon
9 Jun, 2023, 16:49

Are you sure you're not returning those anywhere else in your Function?

🍜Udon🍜
9 Jun, 2023, 16:57

I gave up guys. I went back to the in client solution since it works and doesn't complicate things

🍜Udon🍜
9 Jun, 2023, 16:58

I don't think so. I think it's a firewall thing

ideclon
9 Jun, 2023, 16:59

Not sure how a firewall would make you get back Appwrite env vars

🍜Udon🍜
9 Jun, 2023, 17:50

Not sure either

Drake
9 Jun, 2023, 17:52

How to send and receive function data.

Drake
9 Jun, 2023, 18:22

so it sounds like you're getting an error client side, not server side, right?

Drake
9 Jun, 2023, 18:22

can you check what response.response before decoding it?

Drake
9 Jun, 2023, 18:23

it might be helpful if you shared your full function code and the full (redacted) logs and stderr from the execution

🍜Udon🍜
9 Jun, 2023, 20:08

Nope I have a working version that doesn't use functions. When I try to run that same code server side it doesn't complete payment and it didn't give me the subscriptionId

🍜Udon🍜
9 Jun, 2023, 20:08

I'll send those in

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more