Your IP : 216.73.216.43


Current Path : /home/rtorresani/www/vendor/stripe/module-payments/Plugin/Order/
Upload File :
Current File : //home/rtorresani/www/vendor/stripe/module-payments/Plugin/Order/SaveInitialFee.php

<?php
namespace StripeIntegration\Payments\Plugin\Order;

use StripeIntegration\Payments\Model\Order\InitialFeeManagement;
use Magento\Sales\Api\OrderRepositoryInterface;
use Magento\Sales\Model\Order;

class SaveInitialFee
{
    /**
     * @var InitialFeeManagement
     */
    private $initialFeeManagement;

    public function __construct(InitialFeeManagement $initialFeeManagement)
    {
        $this->initialFeeManagement = $initialFeeManagement;
    }

    public function beforeSave(OrderRepositoryInterface $subject, Order $order)
    {
        return [$this->initialFeeManagement->setDataFrom($order)];
    }
}