![]() 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/old/vendor/magento/module-paypal/ViewModel/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Paypal\ViewModel; use Magento\Checkout\Model\Session; use Magento\Framework\View\Element\Block\ArgumentInterface; use Magento\Paypal\Model\Express\Checkout; /** * Provides Paypal funding source data * */ class PaypalFundingSourceDataProvider implements ArgumentInterface { /** * @var Session */ private $checkoutSession; /** * @param Session $checkoutSession */ public function __construct( Session $checkoutSession ) { $this->checkoutSession = $checkoutSession; } /** * Return paypal funding source * * @return string|null */ public function getPaypalFundingSource() { $quote = $this->checkoutSession->getQuote(); if ($quote->getPayment()->getAdditionalInformation(Checkout::PAYMENT_INFO_FUNDING_SOURCE)) { return ucfirst($quote->getPayment()->getAdditionalInformation( Checkout::PAYMENT_INFO_FUNDING_SOURCE )); } return null; } }