<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/**
 * @see \Magento\Paypal\Block\Adminhtml\System\Config\ApiWizard
 * @var \Magento\Paypal\Block\Adminhtml\System\Config\ApiWizard $block
 */
?>
<div class="pp-buttons-container">
    <div dir="ltr" style="text-align: left;" trbidi="on">
        <script>
            (function(d, s, id){
                var js, ref = d.getElementsByTagName(s)[0];
                if (!d.getElementById(id)){
                    js = d.createElement(s); js.id = id; js.async = true;
                    js.src = "https://www.paypal.com/webapps/merchantboarding/js/lib/lightbox/partner.js";
                    ref.parentNode.insertBefore(js, ref); }
            }(document, "script", "paypal-js"));
        </script>

        <a class="action-default"
           data-paypal-button="true"
           href="<?= /* @noEscape */ $block->escapeUrl($block->getButtonUrl() . '?' . $block->getQuery()) ?>"
           target="PPFrame"><?= $block->escapeHtml($block->getButtonLabel()) ?></a>

        <a class="action-default"
           data-paypal-button="true"
           href="<?= /* @noEscape */ $block->escapeUrl($block->getSandboxButtonUrl(). '?' . $block->getQuery()) ?>"
           target="PPFrame"><?= $block->escapeHtml($block->getSandboxButtonLabel()) ?></a>
    </div>
</div>
