September 3, 20196 yr Hello, I want include a payment module and need to use CURL. I am looking the class inside ClicShopping, but I do not find a function like that. Before to implement something, maybe someone can tell if it exist. Thank you.
September 3, 20196 yr Hello @Alice, Curl is now managed by GuzzleClient, inside HTTP you have 2 functions HTTP::getResponse() and HTTP:setResponseCode() If you do not want to use this approach, you can make the traditionnal CURL code.
September 3, 20196 yr Just an example found inside the paypal module public function makeApiCall($url, $parameters = null, array $headers = null) { $server = parse_url($url); $p = ['url' => $url, 'parameters' => $parameters, 'headers' => $headers ]; if ((substr($server['host'], -10) == 'paypal.com')) { $p['cafile'] = CLICSHOPPING::BASE_DIR . 'Apps/Payment/PayPal/work/paypal.com.crt'; } return HTTP::getResponse($p); } $p must be inside an array with these elements : $parameters url, headers, parameters, method, verify_ssl, cafile, certificate, proxy
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.