user5145 Developer From Germany Member since Feb 2018 user5145 Jul 10 2018 08:38 PM For an new Add-on I have to use cURL.The API requires an Connection over this method, so nothing else helps out.My question:Is there something implementet to Litecart that gives us the possibility to use cURL?-> Because starting an new cURL Session ends always up in an error-> The Connectivity works fine without LC on a small Test Platform! So the Code, that I want to include, works fine.
tim Founder From Sweden Member since May 2013 tim Jul 11 2018 09:30 PM LiteCart has a built in HTTP Client$client = new http_client();$response = $client->call('POST', 'http://...', $data, $extra_headers);
user5145 Developer From Germany Member since Feb 2018 user5145 Jul 16 2018 11:51 PM I hope it's not bad If I use cURL,I tried it with LC's own HTTP Client but the Gateway won't accept the payment:Method, Data and Headers were the same as before... I just put an Instruction in the READ.ME File, how to enable cURL in PHP.
tim Founder From Sweden Member since May 2013 tim Jul 19 2018 03:55 PM cURL is not bad but like you say it is a dependancy and you might be making harder than it is. You can see how your HTTP request and response turned out in logs/http_request_last.log when using LiteCart's client.