I am getting an error unfortunately on the db query part:
Undefined binding(s) detected when compiling SELECT. Undefined column(s): [products.id] query: select "id", "product_name" as "title", "product_sales_price" as "amount" from "products" where "products"."id" in (?, ?, ?)
Here's my query:
The 'id' used in flatten is correct, that's the variable name of the data store's product id field.
By the way, I got all these values stored in the data store too:
title (mandatory) - The name of the product amount (mandatory) - The price of the product currency (optional) - The currency. If not provided it defaults to usd quantity (optional) - The quantity that should be added to the cart. If not provided, it defaults to 1
Can't I just add those variables to the $_POST_LineItems array and send these values to the SC API directly instead of querying the products db table?
In my tests it simply works with NodeJS and Postgres. Seeing the error it looks like the lineItems collection perhaps has an undefined entry. Disable the query step and output the expression you are using in the condition with a setValue step.
I disabled the db query step, but which expression exactly should be output by the Set Value step? I don't get it. Thanks for letting me know in advance.
Did you update to the latest Wappler version? It includes an update for stripe because the initial version did filter out invalid lineItem properties and that is probably what is happening.