Your IP : 216.73.216.43


Current Path : /home/rtorresani/www/vendor/stripe/module-payments/Observer/
Upload File :
Current File : //home/rtorresani/www/vendor/stripe/module-payments/Observer/AfterRemoveCartItem.php

<?php

namespace StripeIntegration\Payments\Observer;

class AfterRemoveCartItem implements \Magento\Framework\Event\ObserverInterface
{
    private $helper;
    private $subscriptionsHelper;
    private $config;

    public function __construct(
        \StripeIntegration\Payments\Helper\Generic $helper,
        \StripeIntegration\Payments\Helper\Subscriptions $subscriptionsHelper,
        \StripeIntegration\Payments\Model\Config $config
    )
    {
        $this->helper = $helper;
        $this->subscriptionsHelper = $subscriptionsHelper;
        $this->config = $config;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        try
        {
            $this->subscriptionsHelper->cancelSubscriptionUpdate();
        }
        catch (\Exception $e)
        {
            $this->helper->logError($e->getMessage(), $e->getTraceAsString());
        }
    }
}