API BindCommerce - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Indy (https://www.atozed.com/forums/forum-8.html) +--- Forum: Indy General Discussion (https://www.atozed.com/forums/forum-9.html) +--- Thread: API BindCommerce (/thread-2718.html) |
API BindCommerce - staff@ergosoft.it - 04-20-2022 Hi, I need to connect a application (delphi 11) with API web service of bindcommerce (https://www.bindcommerce.com/it/guide/api/import-prodotti) this is an examples in php of autentication: <?php ini_set('display_errors', true); error_reporting(E_ALL); $strXml = file_get_contents(__DIR__.'/Products.xml'); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://miohost.bindcommerce.cloud/integrator-tool/api/products.php?connector=N", CURLOPT_SSL_VERIFYPEER => 0, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_VERBOSE => true, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $strXml, CURLOPT_HTTPHEADER => array( "cache-control: no-cache", "content-type: text/xml", "token: 0435a03b361d7cc24fc1acacdeaae1d7" ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } How in delphi ? thanks RE: API BindCommerce - rlebeau - 04-20-2022 (04-20-2022, 11:16 AM)staff@ergosoft.it Wrote: this is an examples in php of autentication: Something like this: Code: uses RE: API BindCommerce - staff@ergosoft.it - 04-20-2022 Hi rlebeau, thanks very much ! it works !!! I have only error on ssl.VerifyMode := []; ssl.VerifyDepth := 0; undeclared identifier (verifymode and verifydeph)... I remove this 2 lines and work... probabily for my ssl version ? .... thanks Alessandro Romano RE: API BindCommerce - rlebeau - 04-20-2022 (04-20-2022, 04:35 PM)staff@ergosoft.it Wrote: I have only error on Sorry, that should have been: Code: ssl.SSLOptions.VerifyMode := []; RE: API BindCommerce - staff@ergosoft.it - 04-21-2022 (04-20-2022, 11:06 PM)rlebeau Wrote:(04-20-2022, 04:35 PM)staff@ergosoft.it Wrote: I have only error on thanks ! |