0
  • 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 ?

3
  • Yes @PhilippSander but how ? Commented Feb 7, 2019 at 10:11
  • Hi Aaditya, if you have done, can you share an example of this ?
    – Ajwad Syed
    Commented Apr 11, 2019 at 11:39
  • Bilal Usean's answer worked for me, you can use that ref. Commented Apr 11, 2019 at 11:52

2 Answers 2

1

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.
1
  • Thanks for the answer +1 , Any example will be helpful @Bilal :) Commented Feb 7, 2019 at 10:37
1

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/

4
  • :) Thanks @PhilippSander for the answer but I want to connect third party module in Magento.. Where REST with OAuth will provide Magento user's token... I want to connect third party in Magento Not Magento into third-party.. Commented Feb 7, 2019 at 10:14
  • Just like an example Of paypal. we connect paypal's user name and password in Magento and Authenticate it. Commented Feb 7, 2019 at 10:15
  • The same way I want to connect Acumatica ERP system in Magento 2 Commented Feb 7, 2019 at 10:18
  • Okay, let me check updated answer. Commented Feb 7, 2019 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.