Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
VaultTokenRenderer.php
Go to the documentation of this file.
1 <?php
7 
13 
21 {
25  private $config;
26 
34  public function __construct(
35  Template\Context $context,
36  Config $config,
37  array $data = []
38  ) {
39  parent::__construct($context, $data);
40  $this->config = $config;
41  }
42 
47  public function getIconUrl()
48  {
49  return $this->config->getPayPalIcon()['url'];
50  }
51 
56  public function getIconHeight()
57  {
58  return $this->config->getPayPalIcon()['height'];
59  }
60 
65  public function getIconWidth()
66  {
67  return $this->config->getPayPalIcon()['width'];
68  }
69 
77  public function canRender(PaymentTokenInterface $token)
78  {
79  return $token->getPaymentMethodCode() === ConfigProvider::PAYPAL_CODE;
80  }
81 
87  public function getPayerEmail()
88  {
89  return $this->getTokenDetails()['payerEmail'];
90  }
91 }
$config
Definition: fraud_order.php:17
__construct(Template\Context $context, Config $config, array $data=[])