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
Payment.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Braintree\Block
;
7
8
use
Magento\Braintree\Model\Ui\ConfigProvider
;
9
use
Magento\Checkout\Model\ConfigProviderInterface
;
10
use
Magento\Framework\View\Element\Template
;
11
use
Magento\Framework\View\Element\Template\Context
;
12
19
class
Payment
extends
Template
20
{
24
private
$config;
25
33
public
function
__construct
(
34
Context
$context,
35
ConfigProviderInterface
$config,
36
array
$data
= []
37
) {
38
parent::__construct($context,
$data
);
39
$this->config =
$config
;
40
}
41
46
public
function
getPaymentConfig
()
47
{
48
$payment
= $this->config->getConfig()[
'payment'
];
49
$config =
$payment
[$this->
getCode
()];
50
$config[
'code'
] = $this->
getCode
();
51
$config[
'clientTokenUrl'
] = $this->_urlBuilder->getUrl(
52
'braintree/payment/getClientToken'
,
53
[
'_secure'
=>
true
]
54
);
55
return
json_encode($config, JSON_UNESCAPED_SLASHES);
56
}
57
62
public
function
getCode
()
63
{
64
return
ConfigProvider::CODE
;
65
}
66
}
Magento\Braintree\Block\Payment
Definition:
Payment.php:19
Magento\Framework\View\Element\Template
Definition:
Context.php:6
$config
$config
Definition:
fraud_order.php:17
Magento\Braintree\Block\Payment\__construct
__construct(Context $context, ConfigProviderInterface $config, array $data=[])
Definition:
Payment.php:33
Magento\Braintree\Model\Ui\ConfigProvider
Definition:
ConfigProvider.php:17
$payment
$payment
Definition:
order.php:17
Magento\Framework\View\Element\Template\Context
Definition:
Context.php:23
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Braintree\Block\Payment\getCode
getCode()
Definition:
Payment.php:62
Magento\Checkout\Model\ConfigProviderInterface
Definition:
ConfigProviderInterface.php:13
Magento\Framework\View\Element\Template
Definition:
Template.php:32
Magento\Braintree\Block
Magento\Braintree\Model\Ui\ConfigProvider\CODE
const CODE
Definition:
ConfigProvider.php:19
Magento\Braintree\Block\Payment\getPaymentConfig
getPaymentConfig()
Definition:
Payment.php:46