<?php
/**
 * SIBS Payment Magento Module.
 *
 * Copyright © 2023 SIBS. All rights reserved.
 *
 * @author    SIBS <suporte@sibs.pt>
 * @license   See LICENSE for license details.
 */
?>
<div class="row">
    <div class="checkout-success-mb col-md-12">
        <p>
            <!-- TODO: Add Payment data -->
            <?php echo $block->getInstructions(); ?>
        </p>
    </div>
</div>

<script type='text/javascript'>
    window.addEventListener('load', function () {
        require(
            ['Magento_Customer/js/customer-data'],
            function (customerData) {
                var cartData = customerData.get('cart');

                customerData.getInitCustomerData().done(function () {
                    if (cartData().items && cartData().items.length !== 0) {
                        customerData.reload(['cart'], false);
                    }
                });
            }
        );
    });
</script>
