{% extends './vista/template/payment/credit_card.twig' %}

{% block scripts_before %}
  <script src="https://static.traycheckout.com.br/js/finger_print.js" type="text/javascript"></script>
{% endblock %}

{% block initForm %}
  <form id="form-{{ paymentName }}" data-yapay="payment-form">
{% endblock %}

{% block scripts %}
  <script>
    function initFingerPrint() {
      if (window.yapay.FingerPrint) {
        window.yapay.FingerPrint( {{ environment }} );
      } else {
        setTimeout(function () {
          initFingerPrint();
        }, 100);
      }
    }

    initFingerPrint();
  </script>

  {{ parent() }}

{% endblock %}
