<?php
/**
 * SIBS Payment Magento Module.
 *
 * Copyright © 2023 SIBS. All rights reserved.
 *
 * @author    SIBS <suporte@sibs.pt>
 * @license   See LICENSE for license details.
 */
?>

<div data-bind="scope: 'messages'">
    <!-- ko if: cookieMessages && cookieMessages.length > 0 -->
    <div role="alert" data-bind="foreach: { data: cookieMessages, as: 'message' }" class="messages">
        <div data-bind="attr: {
            class: 'message-' + message.type + ' ' + message.type + ' message',
            'data-ui-id': 'message-' + message.type
        }">
            <div data-bind="html: $parent.prepareMessageForHtml(message.text)"></div>
        </div>
    </div>
    <!-- /ko -->

    <!-- ko if: messages().messages && messages().messages.length > 0 -->
    <div role="alert" data-bind="foreach: { data: messages().messages, as: 'message' }" class="messages">
        <div data-bind="attr: {
            class: 'message-' + message.type + ' ' + message.type + ' message',
            'data-ui-id': 'message-' + message.type
        }">
            <div data-bind="html: $parent.prepareMessageForHtml(message.text)"></div>
        </div>
    </div>
    <!-- /ko -->
</div>
<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                        "messages": {
                            "component": "Magento_Theme/js/view/messages"
                        }
                    }
                }
            }
    }
</script>

<div class="checkout-failed-sibs">
    <p style="color: darkred; font-size:1.2em; padding:5px;"><?php echo __('We are sorry but payment for your order failed so we canceled your order') ?></p>
    <!-- <a href="/">Try Again Later</a> -->
    
    <!-- <div class="clearfix">&nbsp;</div> -->
</div>

<?php /* @var $block \Sibs\Sibs\Block\Failed */?>
<?php echo $block->getCustomSuccess(); ?>  