12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- use Magento\Paypal\Block\Express\InContext\Minicart\Button;
- /** @var \Magento\Paypal\Block\Express\InContext\Component $block */
- $configuration = [
- '*' => [
- 'Magento_Paypal/js/in-context/express-checkout' => [
- 'id' => Button::PAYPAL_BUTTON_ID,
- 'path' => $block->getUrl(
- 'paypal/express/gettoken',
- [
- '_secure' => $block->getRequest()->isSecure()
- ]
- ),
- 'merchantId' => $block->getMerchantId(),
- 'button' => $block->isButtonContext(),
- 'clientConfig' => [
- 'locale' => $block->getLocale(),
- 'environment' => $block->getEnvironment(),
- 'button' => [
- Button::PAYPAL_BUTTON_ID,
- ],
- ]
- ]
- ]
- ];
- ?>
- <div style="display: none;" id="<?= /* @noEscape */ Button::PAYPAL_BUTTON_ID ?>"></div>
- <script type="text/x-magento-init">
- <?= /* @noEscape */ json_encode($configuration) ?>
- </script>
|