
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
- Appwrite Cloud Custom Domains Issue
I’m trying to configure my custom domain appwrite.qnarweb.com (CNAME pointing to fra.cloud.appwrite.io with Cloudflare proxy disabled) but encountering a TLS ce...
- my database attribute stuck in processin...
when i created attributes in collection 3 of those attributes become "processing", and they are not updating, the worst thing is that i cant even delete them s...
- Is Quick Start for function creation wor...
I am trying to create a Node.js function using the Quick Start feature. It fails and tells me that it could not locate the package.json file. Isn't Quick Start ...
