Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [curl]

Specify questions about cURL which provide library and command-line tool for transferring data using various protocols.

0
votes
1answer
12 views

Magento 2 logout using curl

As per my requirement i want to logout the customer using PHP curl. for that I used the following code in my custom controller action(execute) $lastCustomerId = $this->_customerSession->getId()...
0
votes
0answers
30 views

Not getting the order id using payment information API in magento-2

I need to create the order id after checkout page using endpoints from Magento-2. As per my code, I am getting the following error. {"message":"Please check the shipping address information. ...
1
vote
0answers
29 views

Algolia REST Api's to apply category, Price and Brand filters using PHP curl process on Algolia?

I Have sample curl code, It is working perfectly but I don't know, how to apply filters on category, price, and brands to get all products list. we are using algolia REST API's. $APPI_ID = "...
0
votes
0answers
31 views

magento 1.9: stop newsletter spam with CURL

I have added this module in Magento 1.9 for stop spam in newsletters. https://magecomp.com/magento-google-recaptcha.html This worked fine but, when I try to sign up for the newsletter via curl it ...
0
votes
0answers
32 views

How command pool works? and How can we redirect to payment gateway? Magento 2

I'm integrating a payment gateway using gateway command pool. This is di.xml <virtualType name="AuthorizeCommand" type="Magento\Payment\Gateway\Command\GatewayCommand"> <arguments> ...
2
votes
0answers
156 views

WorldPay Payment Integration using PHP and direct XML method curl API return blank page in Magento 2

I m trying to implement worldpay on a PHP site using XML direct method but whenever I try to connect I get blank pag.. Can you tell me were you testing the payment gateway on live site. Code: $...
2
votes
1answer
214 views

Magento 2 GET API request to external api

In magento 1 you can make get request like this: First Authorizing object- public function authorize($url) { $cookie = $this->getCookieDir(); $user = $this->getApiUser(); $curl = ...
0
votes
1answer
223 views

Magento 2 - Load Balancer - Health Check Failing - 302 redirect

I am having an issue with my load balancer health checks. It is attempting to access the server hosting the Magento 2 site. When I curl the IP address of the machine I get the following Response ...
2
votes
0answers
24 views

Why 2 classes Magento\Framework\HTTP\Client\Curl and Magento\Framework\HTTP\Adapter\Curl for same purpose?

Magento Framework has 2 classes for Curl operations: \Magento\Framework\HTTP\Adapter\Curl and \Magento\Framework\HTTP\Client\Curl What is specific use-case for each as both are capable of doing ...
0
votes
1answer
98 views

Magento 1.9.2.4 cURL issue

I am using Magento 1.9.2.4 and my Magento Connect is not working. Whenever I click check for updates, everything from the bottom disappears, please check the image below: When I try to update Magento ...
2
votes
1answer
47 views

Magento 2 Curl Rest Endpoints

I'm trying to access the REST Endpoints: POST /V1/products/special-price POST /V1/products/special-price-information POST /V1/products/special-price-delete I want to achieve this through PHP code ...
1
vote
0answers
143 views

Magento2.2.2 Backend Curl CURLPROTO_HTTP undefined

This is an odd one: I've just updated my to macOS High Sierra installed missing extensions Frontend it's all good Backend Admin login fine But when logged in get Exepction: > 1 exception(s): ...
2
votes
1answer
306 views

Magento 2 Api/Data, When To Create It?

I have fairly simple REST API request to get guest country code by his ip. In my block file this works perfectly fine when using curl: $url = "http://........./".$guestIp."?access_key=".$...
0
votes
3answers
254 views

Could not update password using customer ID in Magento-2 REST API

I am facing one issue. I am trying to update the customer password using Magento-2 REST API but the password could not update. I am explaining my code below. $adminUrl='http://domain.com/index.php/...
1
vote
1answer
83 views

Magento2 : Getting error while updating the data using API

I am getting the following error while updating the record using the Magento 2 REST API. Error: ( [message] => Request does not match any route. [trace] => ) I am ...
2
votes
0answers
28 views

curl is not operable because of some missing dependecies

Anybody know what it means this error message? And how to solve it? We want to install an extension for Full Page Cache in our Magento Store version 1.9.3. We use Apache Debian 9 for our server.
1
vote
1answer
226 views

How to write Curl code to Magento 2 code

This is my curl code. How to write the same in Magento 2 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, ...
2
votes
2answers
385 views

Magento 2 and ElasticSearch errors. Connection Failed. Test again?

i need some help with configuring my elastic search on magento 2.2.3 and i'm using ES 2.3. I login and configure here: Click Stores > Settings > Configuration > Catalog > Catalog > Catalog Search. ...
0
votes
3answers
681 views

Magento 2: convert curl response into array

I am not able to convert magento 2 JSON response into array. Can you please help in short out this problem? Here is my code: $url = 'http://example.com/api/coop'; $post = [ 'firstname' => ...
0
votes
1answer
95 views

Magento 2 : CURL Use in Observer

I am using event customer_register_success for sending customer detail to a third party website. I am facing problem in implementation of CURL in event observer. Do you have any example of using CURL ...
1
vote
3answers
762 views

How to list all products from API with curl command line?

I've been trying a lot of things and can't seem to figure out what should be pretty simple... How can I make a request with curl in command line to /index.php/rest/V1/products so that I simply get the ...
0
votes
1answer
1k views

Guide for API to third party application from inside Magento 2

The important questions i would like to know are: Can I call a CURL from inside a Model or ResourceModel? Is there any standardized way to handle API's to third party apps? Please keep in mind that, ...
0
votes
3answers
1k views

SOLVED - Api token request Curl returns NULL

I am trying to get a token from my Magento 2 API, my script returns NULL, the call is working fine in Postman and generating a token : $adminUrl='https://www.xxxxxxx.com/rest/V1/integration/admin/...
2
votes
2answers
3k views

magento 2 : How to use curl? [duplicate]

I am trying to to create the curl request but it is not working. It is giving the error Uncaught Error: Class 'Custom\Rma\Helper\Varien_Http_Adapter_Curl' not found Code $header = array( ...
0
votes
1answer
93 views

Unable to add product into cart from third party CURL

I have created custom controller in which I've written custom add to cart action and shared controller URL with 3rd party website. That website is calling my controller using CURL and on success, 3rd ...
1
vote
4answers
2k views

how to fix php curl extension error while installing magento 2

How to fix php curl extension error while installing magento 2? I attached the Screenshot
0
votes
1answer
328 views

Rest api - create customer

I follow this Magento guide to work with Magento API REST (New Learner): http://devdocs.magento.com/guides/v2.2/get-started/order-tutorial/order-create-customer.html In this step I try run this curl ...
1
vote
1answer
1k views

Magento 2 REST API -> PUT example (PHP)

I'm new to the Magento 2 REST API (this is also my first post in this forum, hi all), but during the past day have been able to retrieve information using it to my backend system. GET -requests are ...
2
votes
1answer
420 views

cURL with Magento 2

I need to make cURL requests within my Magento 2 instance to an external source. As far as I can see there are 3 options Use native PHP Use Magento\Framework\HTTP\Adapter\Curl which uses Zend Use ...
0
votes
1answer
366 views

How to get an array from curl response

Use curl in custom module Magento ver 1.9.x In /var/www/html/magento193/app/design/frontend/base/default/template/reviewrating/rightsidebar.phtml $url = "http://mywebsite.com/api/extentionReviews?...
3
votes
0answers
174 views

Add CURLOPT_HTTPHEADER to Magento 2 curl

Currently i'm using magento 2 curl framework to connect to rest api like this: public function __construct(\Magento\Framework\HTTP\Client\Curl $curl ) { $this->_curl = $curl; } private ...
0
votes
1answer
473 views

Magento 2 rest API returns false when trying to get a token

I am trying to create a web app that gets data from a Magento 2 website thanks to the API, following this tutorial but it returns bool(false) when I do var_dump($token) I have read other threads on ...
1
vote
2answers
125 views

Unable to create customer using curl command

I am new to magento. I am facing an issue will trying to create customer using curl command. I am passing the correct json values as customer data as well, but still getting decoding error.Can some ...
1
vote
1answer
4k views

Magento 2 - Curl Method coding standard?

I am calling third party API using below methods: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->_url . 'api/v1/ShipTos'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); ...
1
vote
0answers
176 views

Not able to login to admin panel after updating curl

I am not able to login to my website admin panel,I have checked all the possible solutions available on Google,tried to reset the admin password,cleared the cache,done the changes in varien.php as ...
5
votes
1answer
467 views

Difference between adapter curl and client curl in magento 2

I came across two methods for making a CURL call in Magento 2. Magento\Framework\HTTP\Adapter\Curl Magento\Framework\HTTP\Client\Curl Paypal uses the First one as a factory Method to make ...
4
votes
2answers
2k views

Magento 2 curl POST with JSON body

i've tried to do some curl post to my other services using built in magento curl. i already did this for the curl request $this->curl->post($url, $data); yeah it's work but my data ...
0
votes
2answers
920 views

Magento: curl_setopt_array() error

I downgrade php7 to php 5.6,now my magento site not working its getting error ( ! ) Fatal error: Call to undefined function curl_setopt_array() in /var/www/html/rmcstore/lib/Varien/Http/Adapter/...
0
votes
1answer
300 views

How to insert Image of product programmaticaly through url

How to insert image in magento product via url. Products are inserting but without images $urlToImage = 'image'; has the url of image. and How do i insert products option? <?php ...
0
votes
2answers
887 views

How to Add Custom Options programmatically [duplicate]

Products are inserting, but the custom options are not inserting. $mageFilename = '../app/Mage.php'; require_once $mageFilename; Mage::setIsDeveloperMode(true); ini_set('display_errors', 1); Mage::...
0
votes
2answers
119 views

Inserting Products data programmatically

I'm getting product data from different store via curl call.Now i want insert all the product in my magento store. But only 3 products are inserting than i'm getting this error Uncaught exception '...
0
votes
1answer
2k views

Call to a member function getModelInstance() on null

Getting products from curl request from other store but unable to save data in magento. I'm getting getModelInstance() fatal error. Here is my code <?php $mageFilename = '../app/Mage.php'; ...
0
votes
1answer
57 views

How to store product data in magento store?

I'm getting product data through an api call and now i want to store this data in my magento store? can anyone help me out to store without duplication <?php $curl = curl_init(); ...
4
votes
2answers
388 views

Bug in Magento Curl.php

Is it a bug in Magento 1.9.3.2 ? I found this function in downloader\lib\Mage\HTTP\Client\Curl.php /** * Set curl options array directly * @param array $array */ protected function curlOptions($...
0
votes
1answer
360 views

CURL error 'malformed' for Walmart API

I'm trying to send a request to Walmarts API but am getting a 'malformed' error when sending my GET request, hoping someone could help. Below is my code class Admin2 { function __construct() { ...
1
vote
1answer
2k views

update cURL php5 module

I've recently noticed the following message in the Magento backend: "Your current version of cURL php5 module is 7.19.7, which can prevent services that require TLS v1.2 from working correctly. It is ...
3
votes
1answer
1k views

Magento 2 curl send header with response

I call Curl in my code. Please have a look class Data extends \Magento\Framework\App\Helper\AbstractHelper { public function __construct( \Magento\Framework\HTTP\Adapter\Curl $...
1
vote
1answer
110 views

Magento 1.9 . php_curl.dll and soap.dll is not loading

I am getting following errors on error_log file [26-Dec-2016 00:56:14 America/Denver] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/php/56/usr/lib64/php/modules/php_soap.dll' - /...
3
votes
2answers
3k views

Magento 2 searchCriteria using REST APIs

I have the following query: $url = http://kostakfashion.com/rest/V1/products/?searchCriteria[filter_groups][0][filters][0][field]=category_gear&searchCriteria[filter_groups][0][filters][0][...
3
votes
0answers
676 views

Magento 1.8.1.0 PayPal IPN postback failure

I have a Magento 1.8.1.0 e-commerce website updated with the latest security patches. It runs on a Linux machine with openSUSE 12.3 and: PHP 5.3.17 Apache 2.2.29 MySQL Ver 14.14 Distrib 5.5.33 ...