![]() 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/Block/Payment/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Paypal\Block\Payment; /** * PayPal common payment info block * Uses default templates */ class Info extends \Magento\Payment\Block\Info\Cc { /** * @var \Magento\Paypal\Model\InfoFactory */ protected $_paypalInfoFactory; /** * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Payment\Model\Config $paymentConfig * @param \Magento\Paypal\Model\InfoFactory $paypalInfoFactory * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Magento\Paypal\Model\InfoFactory $paypalInfoFactory, array $data = [] ) { $this->_paypalInfoFactory = $paypalInfoFactory; parent::__construct($context, $paymentConfig, $data); } /** * Don't show CC type for non-CC methods * * @return string|null */ public function getCcTypeName() { if (\Magento\Paypal\Model\Config::getIsCreditCardMethod($this->getInfo()->getMethod())) { return parent::getCcTypeName(); } } /** * Prepare PayPal-specific payment information * * @param \Magento\Framework\DataObject|array|null $transport * @return \Magento\Framework\DataObject */ protected function _prepareSpecificInformation($transport = null) { $transport = parent::_prepareSpecificInformation($transport); $payment = $this->getInfo(); $paypalInfo = $this->_paypalInfoFactory->create(); if ($this->getIsSecureMode()) { $info = $paypalInfo->getPublicPaymentInfo($payment, true); } else { $info = $paypalInfo->getPaymentInfo($payment, true); } return $transport->addData($info); } }