<?php
/**
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the GNU General Public License (GPL 3)
 * that is bundled with this package in the file LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Payone_Core to newer
 * versions in the future. If you wish to customize Payone_Core for your
 * needs please refer to http://www.payone.de for more information.
 *
 * @category        Payone
 * @package         design_frontend_base_default
 * @subpackage      template
 * @copyright       Copyright (c) 2020 <kontakt@fatchip.de> - www.fatchip.com
 * @author          Vincent Boulanger <vincent.boulanger@fatchip.de>
 * @license         <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
 * @link            http://www.fatchip.com
 */

/** @var $this Payone_Core_Block_Payment_Method_RatepayDeviceFingerprint */
?>

<?php
if ($this->isRatepayIsActivated()) {
    $sDeviceIdentToken = $this->getRatePayDeviceFingerprint();
    $sDeviceIdentId = $this->getRatePayDeviceFingerprintSnippetId();
?>
<div style="display: none">
    <script language="JavaScript">
        var di = {t: '<?php echo $sDeviceIdentToken; ?>', v: '<?php echo $sDeviceIdentId; ?>', l: 'Checkout'};
    </script>
    <script type="text/javascript" src="//d.ratepay.com/<?php echo $sDeviceIdentId; ?>/di.js"></script>
    <noscript>
        <link rel="stylesheet" type="text/css"
              href="//d.ratepay.com/di.css?t=<?php echo $sDeviceIdentToken; ?>&v=<?php echo $sDeviceIdentId; ?>&l=Checkout">
    </noscript>
    <object type="application/x-shockwave-flash" data="//d.ratepay.com/<?php echo $sDeviceIdentId; ?>/c.swf" width="0"
            height="0">
        <param name="movie" value="//d.ratepay.com/<?php echo $sDeviceIdentId; ?>/c.swf"/>
        <param name="flashvars" value="t=<?php echo $sDeviceIdentToken; ?>&v=<?php echo $sDeviceIdentId; ?>"/>
        <param name="AllowScriptAccess" value="always"/>
    </object>
</div>
<?php } ?>