
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:
TypeScript
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:
TypeScript
{"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
TL;DR
Developers are having issues parsing the body passed to the function when trying to extend a template example of Payments With Stripe to receive line items. The relevant code provided does not seem to be properly parsing the body to retrieve the necessary data. The issue might lie in how the data is being passed or read within the function. Double-check the data passing and retrieval process to ensure everything is being handled correctly. Recommended threads
- How can I query for pref in Teams
for example in teams' `pref` i have pref = { "code": "CDJKUE" } I have created query like below ``` TeamList teamList = await teams.list(queries: [ Query....
- Im getting a server error when deleting ...
I was deleting a couple of documents in my collections and now my delete requests are taking a long time and then failing. I believe i got a code 524 and now I'...
- Server Error
When attempting to delete a document, a 524 server error is returned. <#1072905050399191082>
