{**
 * 2021 Crédit Agricole
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0).
 * It is also available through the world-wide-web at this URL: https://opensource.org/licenses/AFL-3.0
 *
 * @author    PrestaShop / PrestaShop partner
 * @copyright 2020-2021 Crédit Agricole
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 *
 *}

{extends file='page.tpl'}

{block name='page_content_container'}
  <div id="js-worldlineop-loader">
    <h1>{l s='Please wait while we are processing your payment' mod='cawlop'}</h1>
    <img src="{$img_path|escape:'html':'UTF-8'}icons/loader.svg" title="Loading..." alt="Loading..." />
  </div>
  <div id="js-worldlineop-timeout-message" style="display: none;">
    <div class="alert alert-warning">
      <p>{l s='The transaction has not been confirmed yet.' mod='cawlop'}</p>
      <p>
        {l s='We suggest you contact our customer service using this link:' mod='cawlop'}
        <a title="{l s='Contact-us' mod='cawlop'}" href="{$link->getPageLink('contact', true)|escape:'html':'UTF-8'}">
          {$link->getPageLink('contact', true)|escape:'html':'UTF-8'}
        </a>
      </p>
      {if $hostedCheckoutId || $paymentId}
        <p>
          {l s='Please also provide us these transactions details:' mod='cawlop'}<br>
          {if $paymentId}
            <b>{l s='Payment ID:' mod='cawlop'}</b> {$paymentId|escape:'html':'UTF-8'}
          {/if}
          {if $hostedCheckoutId}
            <b>{l s='Checkout ID:' mod='cawlop'}</b> {$hostedCheckoutId|escape:'html':'UTF-8'}
          {/if}
        </p>
      {/if}
    </div>
  </div>
{/block}

{block name="javascript_bottom"}
  {$smarty.block.parent}
  <script>
    const worldlineopRedirectController = "{$worldlineopRedirectController|escape:'javascript':'UTF-8'}";
    const returnMac = "{$returnMac|escape:'javascript':'UTF-8'}";
    const hostedCheckoutId = "{$hostedCheckoutId|escape:'javascript':'UTF-8'}";
    const paymentId = "{$paymentId|escape:'javascript':'UTF-8'}";
    const worldlineopCustomerToken = "{$worldlineopCustomerToken|escape:'javascript':'UTF-8'}";
  </script>
{/block}
