. */ namespace Storefront\BTCPay\Console\Command; use Storefront\BTCPay\Helper\Data; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class TransactionsUpdate extends Command { /** * @var Data */ private $helper; public function __construct(Data $helper, string $name = null) { parent::__construct($name); $this->helper = $helper; } /** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $numUpdated = $this->helper->updateIncompleteTransations(); $output->writeln('Updated ' . $numUpdated . ' transactions from BTCPay Server'); } /** * {@inheritdoc} */ protected function configure() { $this->setName('btcpay:transaction:update'); $this->setDescription('Poll your BTCPay Server for the latest transaction updates (in case you missed any)'); parent::configure(); } }