Inxmail order referenced commands

Edit on GitHub

Inxmail module has four different commands:

  • \SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailNewOrderPlugin
  • \SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailOrderCanceledPlugin
  • \SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailPaymentNotReceivedPlugin
  • \SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailShippingConfirmationPlugin

You can use this commands in \Pyz\Zed\Oms\OmsDependencyProvider::getCommandPlugins

 ...
 use SprykerEco\Zed\Inxmail\Communication\Plugin\Oms\Command\InxmailNewOrderPlugin;
 ...

 /**
 * @param \Spryker\Zed\Kernel\Container $container
 *
 * @return \Spryker\Zed\Oms\Communication\Plugin\Oms\Command\CommandCollection
 */
 protected function getCommandPlugins(Container $container)
 {
 $collection = parent::getCommandPlugins($container);

 ...
 $collection->add(new InxmailNewOrderPlugin(), 'Inxmail/SendNewOrderRequest');
 ...

 return $collection;
 }

After that you are ready to use commands in OMS setup:

 <events>
 <event name="authorize" onEnter="true" manual="true" command="Inxmail/SendNewOrderRequest"/>
 <event name="pay" manual="true" timeout="1 hour" />
 <event name="export" onEnter="true" manual="true" command="Oms/SendOrderConfirmation"/>
 <event name="ship" manual="true" command="Oms/SendOrderShipped"/>
 <event name="stock-update" manual="true"/>
 <event name="close" manual="true" timeout="1 hour"/>
 <event name="return" manual="true" />
 </events>