1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- /**
- * @var \Magento\Braintree\Block\Paypal\Button $block
- */
- $id = $block->getContainerId() . mt_rand();
- $config = [
- 'Magento_Braintree/js/paypal/button' => [
- 'id' => $id,
- 'clientToken' => $block->getClientToken(),
- 'displayName' => $block->getMerchantName(),
- 'actionSuccess' => $block->getActionSuccess()
- ]
- ];
- ?>
- <div data-mage-init='<?= /* @noEscape */ json_encode($config) ?>'
- class="paypal checkout paypal-logo braintree-paypal-logo<?= /* @noEscape */ $block->getContainerId() ?>-container">
- <button data-currency="<?= /* @noEscape */ $block->getCurrency() ?>"
- data-locale="<?= /* @noEscape */ $block->getLocale() ?>"
- data-amount="<?= /* @noEscape */ $block->getAmount() ?>"
- id="<?= /* @noEscape */ $id ?>"
- class="action-braintree-paypal-logo" disabled>
- <img class="braintree-paypal-button-hidden"
- src="https://checkout.paypal.com/pwpp/2.17.6/images/pay-with-paypal.png"
- alt="<?= $block->escapeHtml(__('Pay with PayPal')) ?>"
- title="<?= $block->escapeHtml(__('Pay with PayPal')) ?>"/>
- </button>
- </div>
|