// Exemple de calcul_shipping
$ Url = $ tabain_url. & # 39; /API_DS_ORDERS.PHP? Action = Calculate_shipping & amp; country = & # 39; $ _ get [& # 39; country & # 39;]. & # 39; & amp; post_code = & # 39; # # 39; post_code & # 39;];
$ Data_products [0] = array ("products_id" = & gt; $ _get [& # 39; products_id & # 39;], // Exemple: 130 (seul le nombre est requis) * Champ requis
"Products_quantity" = & gt; $ _Get [& # 39; Products_quantity & # 39;] // Exemple: 1 (le seul numéro est requis) * Champ requis
));
$ Data_products [1] = array ("products_id" = & gt; $ _get [& # 39; products_id1 & # 39;], // Exemple: 130 (seul numéro est requis) * Champ requis
"Products_quantity" = & gt; $ _Get [& # 39; products_quantity1 & # 39;] // Exemple: 1 (seul le nombre est requis) * Champ requis
));
$ Data = array ("products" = & gt; $ data_products // * champ requis
));
$ data_string = json_encode ($ date);
$ Ch = curl_init ($ url);
Curl_setopt ($ ch, curlopt_customrequest, "post");
Curl_setopt ($ ch, curlopt_postfields, $ data_string);
Curl_setopt ($ ch, curlopt_returntransfer, true);
curl_setopt ($ ch, curlopt_ssl_verifypeer, false);
Curl_setopt ($ ch, curlopt_httpheader, array (
& # 39; Type de contenu: application / json & # 39;,
"Cache-Control: No-cache",
& # 39; token: & # 39; . base64_encode (token $),
& # 39; secret: & # 39; . base64_encode ($ secret),
& # 39; e-mail: & # 39; . base64_encode ($ e-mail),
& # 39; Content-Length: & # 39; . Strlen ($ data_string)))
));
$ result = curl_exec ($ ch);
Curl_close ($ ch);
print_r ($ result);
// Exemple de calcul_shipping eof
re>