for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* MIT License
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
namespace SprykerEco\Zed\Heidelpay\Communication\Plugin\Checkout\Oms\Command;
use Orm\Zed\Sales\Persistence\SpySalesOrder;
use Spryker\Zed\Kernel\Communication\AbstractPlugin;
use Spryker\Zed\Oms\Business\Util\ReadOnlyArrayObject;
use Spryker\Zed\Oms\Dependency\Plugin\Command\CommandByOrderInterface;
* @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayFacadeInterface getFacade()
* @method \SprykerEco\Zed\Heidelpay\Communication\HeidelpayCommunicationFactory getFactory()
* @method \SprykerEco\Zed\Heidelpay\Persistence\HeidelpayQueryContainerInterface getQueryContainer()
* @method \SprykerEco\Zed\Heidelpay\HeidelpayConfig getConfig()
class DebitOnRegistrationPlugin extends AbstractPlugin implements CommandByOrderInterface
{
* {@inheritdoc}
* - Execute DebitOnRegistration API transaction.
*
* @api
* @param \Orm\Zed\Sales\Persistence\SpySalesOrderItem[] $orderItems
* @param \Orm\Zed\Sales\Persistence\SpySalesOrder $orderEntity
* @param \Spryker\Zed\Oms\Business\Util\ReadOnlyArrayObject $data
* @return array
public function run(array $orderItems, SpySalesOrder $orderEntity, ReadOnlyArrayObject $data): array
$this->getFactory()
->createDebitOnRegistrationOmsCommand()
->execute($orderItems, $orderEntity, $data);
return [];
}