Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Info.php
Go to the documentation of this file.
1 <?php
7 
12 class Info extends \Magento\Payment\Block\Info\Cc
13 {
18 
25  public function __construct(
26  \Magento\Framework\View\Element\Template\Context $context,
27  \Magento\Payment\Model\Config $paymentConfig,
28  \Magento\Paypal\Model\InfoFactory $paypalInfoFactory,
29  array $data = []
30  ) {
31  $this->_paypalInfoFactory = $paypalInfoFactory;
32  parent::__construct($context, $paymentConfig, $data);
33  }
34 
40  public function getCcTypeName()
41  {
42  if (\Magento\Paypal\Model\Config::getIsCreditCardMethod($this->getInfo()->getMethod())) {
43  return parent::getCcTypeName();
44  }
45  }
46 
53  protected function _prepareSpecificInformation($transport = null)
54  {
55  $transport = parent::_prepareSpecificInformation($transport);
56  $payment = $this->getInfo();
57  $paypalInfo = $this->_paypalInfoFactory->create();
58  if ($this->getIsSecureMode()) {
59  $info = $paypalInfo->getPublicPaymentInfo($payment, true);
60  } else {
61  $info = $paypalInfo->getPaymentInfo($payment, true);
62  }
63  return $transport->addData($info);
64  }
65 }
_prepareSpecificInformation($transport=null)
Definition: Info.php:53
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Magento\Paypal\Model\InfoFactory $paypalInfoFactory, array $data=[])
Definition: Info.php:25
$payment
Definition: order.php:17
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52