Hi guys, Im triying to do the same tasks explained here but for some reason, I’ve been failing miserably and cannot find the source of my error, I have a resource with the following snippet call:
[[!#POST.courseId]]
[[!#GET.courseId]][[!createIntent?
&post=[[!#POST]]
&courseId=[[!#POST.courseId]]
&disCode=[[!#POST.disCode]]
&successRedirect=23
&failRedirect=23
¤cy=[[++chargeCurrency]]
&reBuy=[[!#POST.reBuy]]
&unitId=[[!#POST.unitId]]
]]
And I’m trying to call it from a fetch call like this
fetch(“https://192.168.0.104/intent.html”, {
method: “POST”,
headers: {
“Content-Type”: “application/json”
},
data: JSON.stringify(purchase)
})
where purchase is
courseId: “18”
disCode: undefined
items: Array(1)
0: {id: “xl-tshirt”}
And I can see the data traveling on the request inside the dev tools
But inside the snippet, courseId it’s always null and the print of POST on the resources comes clean, what could I be missing?