Question

  • How to establish the connection of third party ERP system in magento 2 ?
  • I have credential of Acumatica, How can I establish the connection in Magento 2 and set some data to that ERP system, and Also the fetch the data from third party ERP system.
  • Any guidance regarding third party connection with Magento 2 will be helpful.

Note : I am aware about API integration but How to establish the connection for that particular third party ERP in Magento 2 ?

Was it helpful?

Solution

If you want to connect any third party service, most of the chances they(Acumatica) have API access for their(Acumatica) system. So, you need to use their API to push and pull the data from anywhere(Magento).

E.g) I'm not aware of Acumatica, But If I'm in your place I do the below things

  1. I found the Acumatica provide REST API support
  2. So, I'll use the REST api to authenticate the Acumatica (you can use php CURL or Magento in built http client for authentication)
  3. After that I used the same http client and will do the push/pull operations.

OTHER TIPS

X consuming Magento

REST with Oauth1.

Generate an Integration token from the backend.

The connection can be tested with postman or any other tool. the api-consumer connects just like you would.

Magento consuming X

/**
 * @var \Magento\Framework\HTTP\Client\Curl
 */
protected $_curl;

/**
 * @param Context                             $context
 * @param \Magento\Framework\HTTP\Client\Curl $curl
 */
public function __construct(
    Context $context,
    \Magento\Framework\HTTP\Client\Curl $curl
) {
    $this->_curl = $curl;
    parent::__construct($context);
}

public function execute()
{
    //if the method is get
    $this->_curl->get($url);
    //if the method is post
    $this->_curl->post($url, $params);
    //response will contain the output in form of JSON string
    $response = $this->_curl->getBody();
}

https://webkul.com/blog/use-curl-magento-2/

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top