Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CardRenderer.php
Go to the documentation of this file.
1 <?php
7 
12 
18 {
26  public function canRender(PaymentTokenInterface $token)
27  {
28  return $token->getPaymentMethodCode() === ConfigProvider::CODE;
29  }
30 
35  public function getNumberLast4Digits()
36  {
37  return $this->getTokenDetails()['maskedCC'];
38  }
39 
44  public function getExpDate()
45  {
46  return $this->getTokenDetails()['expirationDate'];
47  }
48 
53  public function getIconUrl()
54  {
55  return $this->getIconForType($this->getTokenDetails()['type'])['url'];
56  }
57 
62  public function getIconHeight()
63  {
64  return $this->getIconForType($this->getTokenDetails()['type'])['height'];
65  }
66 
71  public function getIconWidth()
72  {
73  return $this->getIconForType($this->getTokenDetails()['type'])['width'];
74  }
75 }
canRender(PaymentTokenInterface $token)