$queryUrl = $this->bitrix_url'/crm.lead.productrows.set.json';
$queryData = http_build_query(array(
'id' => $leadID,
'rows' => array(
array(
"PRODUCT_ID" => $id,
"PRICE" => $price,
"QUANTITY" => $qty,
)),
));
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $queryUrl,
CURLOPT_POSTFIELDS => $queryData,
));
$result = curl_exec($curl);
curl_close($curl);
$result = json_decode($result, 1);
'rows' => array(
array(
"PRODUCT_ID" => $id,
"PRICE" => $price,
"QUANTITY" => $qty,
),
array(
"PRODUCT_ID" => $id2,
"PRICE" => $price2,
"QUANTITY" => $qty2,
)
),