JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr{ gilour

File "SyncProductOnEnabledGateways.php"

Full Path: /home/markqprx/iniasli.pro/Billing/Gateways/Actions/SyncProductOnEnabledGateways.php
File size: 635 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Common\Billing\Gateways\Actions;

use Common\Billing\Gateways\Paypal\Paypal;
use Common\Billing\Gateways\Stripe\Stripe;
use Common\Billing\Models\Product;

class SyncProductOnEnabledGateways
{
    public function __construct(
        protected Stripe $stripe,
        protected Paypal $paypal
    ) {
    }

    public function execute(Product $product): void
    {
        @ini_set('max_execution_time', 300);

        if ($this->stripe->isEnabled()) {
            $this->stripe->syncPlan($product);
        }
        if ($this->paypal->isEnabled()) {
            $this->paypal->syncPlan($product);
        }
    }
}