
Hi, I am having this weird issue where the body passed to the function is not being parsed.
I am following the template example of Payments With Stripe, extending it to receive line items.
Relevant code is as follows:
const fallbackUrl = req.scheme + '://' + req.headers['host'] + '/';
log(req.body);
const successUrl = req.body?.successUrl ?? fallbackUrl;
const failureUrl = req.body?.failureUrl ?? fallbackUrl;
const currency = req.body?.currency ?? 'eur';
const product = req.body['product'];
const quantity = req.body?.quantity ?? 1;
log({ successUrl, failureUrl, currency, product, quantity });
log is as follows:
{"successUrl":"https://[[domain]]/credits/return",
"failureUrl":"https://[[domain]]/credits/return",
"product":"price_1PP*****************",
"quantity":1,
"currency":"eur"}
{"successUrl":"http://cloud.appwrite.io/",
"failureUrl":"http://cloud.appwrite.io/",
"currency":"eur",
"quantity":1}
I have no clue why nothing is being read at this point. Let me know if more context is needed
Recommended threads
- Inconsistent Function Execution Times
Hi Appwrite Team, I'm experiencing inconsistent execution times with my functions, and I'd appreciate your insights. I've added detailed logs to my function t...
- The first call to the functions takes be...
I have a very big problem with appwrite functions. I am using appwrite 1.6.0 and all the functions that I have have the same problem, in the first call they tak...
- Error Msg: Http invalid protocol\nError ...
Hi, I am trying to upload large files to Appwrite in chunks. The code: Receives a file (Base64 encoded) and its name via a JSON payload. Decodes the Base64 data...
