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\Condition;
use Orm\Zed\Sales\Persistence\SpySalesOrderItem;
use Spryker\Zed\Kernel\Communication\AbstractPlugin;
use Spryker\Zed\Oms\Dependency\Plugin\Condition\ConditionInterface;
* @method \SprykerEco\Zed\Heidelpay\Business\HeidelpayFacadeInterface getFacade()
* @method \SprykerEco\Zed\Heidelpay\HeidelpayConfig getConfig()
* @method \SprykerEco\Zed\Heidelpay\Communication\HeidelpayCommunicationFactory getFactory()
* @method \SprykerEco\Zed\Heidelpay\Persistence\HeidelpayQueryContainerInterface getQueryContainer()
class IsCaptureSuccessPlugin extends AbstractPlugin implements ConditionInterface
{
* {@inheritDoc}
* - Checks if Capture transaction was successful.
*
* @api
* @param \Orm\Zed\Sales\Persistence\SpySalesOrderItem $orderItem
* @return bool
public function check(SpySalesOrderItem $orderItem): bool
return $this->getFacade()
->isCaptureSuccessful($orderItem);
}