Magento 外部访问
Magento external access
我有一个 Shopify 应用程序,我愿意将其移植到 Magento。
给定 运行 Magento 电子商务 URL,有没有办法:
- 检索 [token / OAuth] 以使用 RESTFul / SOAP / 任何方式从 Magento 访问数据?
- 使用公开的 Magento API,注册一个外部 URL 作为 webhook 端点,以便在创建订单或创建/更新/销毁产品时接收通知?
- 如果两者都可行,您如何处理所有这些不同的 Magento 版本?
Retrieve a [token / OAuth] to access the data from Magento using a RESTFul / SOAP / Whatever way?
是的。 REST API in Magento 使用 OAuth 身份验证过程并提供获取令牌等所需的端点。
Using Magento exposed API, register an external URL as a webhook endpoint to receive notifications whenever an Order gets created or when a Product gets created / updated / destroyed?
没有。 Magento 合并 event driven architecture (EDA), so the best way to provide data to your external endpoint would be to create an observer in Magento, connect it to whichever event you want to monitor (for example, sales_order_place_after
for new orders) 并使用观察者将数据发送到您的外部端点。
从技术上讲,您的要求是可行的,但您需要使用自定义的 API 端点自行实现,该端点按照上述观察者模式注册新的观察者。
If both things are possible, how do you take care of all those different Magento versions?
我不确定我是否理解这个问题,但是当您开始使用 Magento 时,您将选择要使用的版本。显然,您应该选择使用最新版本的 Magento 1 或 2,因为它在功能和安全补丁方面是最安全和最新的,但是您的主要问题是您是否要使用 Magento 1或 Magento 2。网上有很多关于此的比较,但我建议您使用 Magento 2 纯粹是因为 Magento 1 将在几年后被弃用。
我有一个 Shopify 应用程序,我愿意将其移植到 Magento。 给定 运行 Magento 电子商务 URL,有没有办法:
- 检索 [token / OAuth] 以使用 RESTFul / SOAP / 任何方式从 Magento 访问数据?
- 使用公开的 Magento API,注册一个外部 URL 作为 webhook 端点,以便在创建订单或创建/更新/销毁产品时接收通知?
- 如果两者都可行,您如何处理所有这些不同的 Magento 版本?
Retrieve a [token / OAuth] to access the data from Magento using a RESTFul / SOAP / Whatever way?
是的。 REST API in Magento 使用 OAuth 身份验证过程并提供获取令牌等所需的端点。
Using Magento exposed API, register an external URL as a webhook endpoint to receive notifications whenever an Order gets created or when a Product gets created / updated / destroyed?
没有。 Magento 合并 event driven architecture (EDA), so the best way to provide data to your external endpoint would be to create an observer in Magento, connect it to whichever event you want to monitor (for example, sales_order_place_after
for new orders) 并使用观察者将数据发送到您的外部端点。
从技术上讲,您的要求是可行的,但您需要使用自定义的 API 端点自行实现,该端点按照上述观察者模式注册新的观察者。
If both things are possible, how do you take care of all those different Magento versions?
我不确定我是否理解这个问题,但是当您开始使用 Magento 时,您将选择要使用的版本。显然,您应该选择使用最新版本的 Magento 1 或 2,因为它在功能和安全补丁方面是最安全和最新的,但是您的主要问题是您是否要使用 Magento 1或 Magento 2。网上有很多关于此的比较,但我建议您使用 Magento 2 纯粹是因为 Magento 1 将在几年后被弃用。