Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
component.phtml
Go to the documentation of this file.
1 <?php
7 
11  '*' => [
12  'Magento_Paypal/js/in-context/express-checkout' => [
13  'id' => Button::PAYPAL_BUTTON_ID,
14  'path' => $block->getUrl(
15  'paypal/express/gettoken',
16  [
17  '_secure' => $block->getRequest()->isSecure()
18  ]
19  ),
20  'merchantId' => $block->getMerchantId(),
21  'button' => $block->isButtonContext(),
22  'clientConfig' => [
23  'locale' => $block->getLocale(),
24  'environment' => $block->getEnvironment(),
25  'button' => [
26  Button::PAYPAL_BUTTON_ID,
27  ],
28  ]
29  ]
30  ]
31 ];
32 
33 ?>
34 <div style="display: none;" id="<?= /* @noEscape */ Button::PAYPAL_BUTTON_ID ?>"></div>
35 <script type="text/x-magento-init">
36  <?= /* @noEscape */ json_encode($configuration) ?>
37 </script>
$block
Definition: block.php:8
$configuration
Definition: component.phtml:10