magento2-plugin/Observer/CheckWebhooks.php
2021-09-08 16:47:45 +02:00

34 lines
648 B
PHP

<?php
declare(strict_types=1);
namespace Storefront\BTCPay\Observer;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class CheckWebhooks implements ObserverInterface
{
/**
* @param Observer $observer
* @return void
*/
public function execute(Observer $observer)
{
$changedPaths = $observer->getEvent()->getData('changed_paths');
foreach ($changedPaths as $changedPath){
if ($changedPath==="payment/btcpay/btcpay_store_id"){
//TODO check BTCPay Stores in use
//TODO: check webhooks
}
}
}
}