Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-braintree
Block
Customer
PayPal
VaultTokenRenderer.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Braintree\Block\Customer\PayPal
;
7
8
use
Magento\Braintree\Gateway\Config\PayPal\Config
;
9
use
Magento\Braintree\Model\Ui\PayPal\ConfigProvider
;
10
use
Magento\Framework\View\Element\Template
;
11
use
Magento\Vault\Api\Data\PaymentTokenInterface
;
12
use
Magento\Vault\Block\AbstractTokenRenderer
;
13
20
class
VaultTokenRenderer
extends
AbstractTokenRenderer
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
}
Magento\Vault\Block\AbstractTokenRenderer
Definition:
AbstractTokenRenderer.php:17
Magento\Framework\View\Element\Template
Definition:
Context.php:6
Magento\Braintree\Model\Ui\PayPal\ConfigProvider\PAYPAL_CODE
const PAYPAL_CODE
Definition:
ConfigProvider.php:17
$config
$config
Definition:
fraud_order.php:17
Magento\Braintree\Block\Customer\PayPal\VaultTokenRenderer\canRender
canRender(PaymentTokenInterface $token)
Definition:
VaultTokenRenderer.php:77
Magento\Braintree\Gateway\Config\PayPal\Config
Definition:
Config.php:14
Magento\Braintree\Model\Ui\PayPal\ConfigProvider
Definition:
ConfigProvider.php:15
Magento\Braintree\Block\Customer\PayPal\VaultTokenRenderer\getIconUrl
getIconUrl()
Definition:
VaultTokenRenderer.php:47
Magento\Vault\Block\AbstractTokenRenderer\getTokenDetails
getTokenDetails()
Definition:
AbstractTokenRenderer.php:56
$token
$token
Definition:
fake_payment_token.php:14
Magento\Framework\View\Element\Template\Context
Definition:
Context.php:23
Magento\Braintree\Block\Customer\PayPal\VaultTokenRenderer\getIconWidth
getIconWidth()
Definition:
VaultTokenRenderer.php:65
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Braintree\Block\Customer\PayPal\VaultTokenRenderer\__construct
__construct(Template\Context $context, Config $config, array $data=[])
Definition:
VaultTokenRenderer.php:34
Magento\Braintree\Block\Customer\PayPal\VaultTokenRenderer\getPayerEmail
getPayerEmail()
Definition:
VaultTokenRenderer.php:87
Magento\Braintree\Block\Customer\PayPal\VaultTokenRenderer\getIconHeight
getIconHeight()
Definition:
VaultTokenRenderer.php:56
Magento\Framework\View\Element\Template
Definition:
Template.php:32
Magento\Braintree\Block\Customer\PayPal\VaultTokenRenderer
Definition:
VaultTokenRenderer.php:20
Magento\Vault\Api\Data\PaymentTokenInterface
Definition:
PaymentTokenInterface.php:14
Magento\Braintree\Block\Customer\PayPal
Definition:
VaultTokenRenderer.php:6