(deleted)
Edit History
I think you made a mistake by starting a new curl session for each request.
I suggest a single init then for each step, do the exec.
I tend to remember also that postfields is an array not the query string.
I also remember that the curl api in php has difficulties with cookie. I usually address that thru a header callback function.
This is one of the comment I have on one of my code intensively using curl
// cUrl is the dumbiest smartest piece of code. Header get completly // useless while using CURLOPT_FOLLOWLOCATION or CURLOPT_COOKIEFILE or CURLOPT_AUTOREFERER // information get pruned off the header most of the time (worst it is implemenation/version // dependent). Let's handle that manually
It seems, your problem is cUrl specific, nothing to do with Prestashop
Best,
(d)oekia