<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
<div class="wpf_payment_info">
    <div class="wpf_payment_info_item wpf_payment_info_item_order_id">
        <?php if ($submission->order_items) : ?>
            <div class="wpf_item_heading"><?php esc_html_e('Order ID:', 'wp-payment-form'); ?></div>
        <?php else : ?>
            <div class="wpf_item_heading"><?php esc_html_e('Submission ID:', 'wp-payment-form'); ?></div>
        <?php endif; ?>
        <div class="wpf_item_value">#<?php echo esc_html($submission->id); ?></div>
    </div>
    <div class="wpf_payment_info_item wpf_payment_info_item_date">
        <div class="wpf_item_heading"><?php esc_html_e('Date:', 'wp-payment-form'); ?></div>
        <div class="wpf_item_value"><?php echo esc_html(wp_date(get_option('date_format'), strtotime($submission->created_at))); ?></div>
    </div>
    <?php if ($submission->payment_total) : ?>
        <?php
        $wppayform_currency_setting = \WPPayForm\App\Services\GeneralSettings::getGlobalCurrencySettings();
        $wppayform_currency_setting['currency_sign'] = \WPPayForm\App\Services\GeneralSettings::getCurrencySymbol($submission->currency);
        ?>
        <div class="wpf_payment_info_item wpf_payment_info_item_total">
            <div class="wpf_item_heading"><?php esc_html_e('Total:', 'wp-payment-form'); ?></div>
            <div class="wpf_item_value"><?php echo ($submission->payment_total > 0) ? esc_html(wpPayFormFormattedMoney($submission->payment_total, $wppayform_currency_setting)) : esc_html_e('pending', 'wp-payment-form'); ?></div>
        </div>
    <?php endif; ?>
    <?php if ($submission->payment_method) : 
         $wppayform_payment_method = lcfirst(strtolower(esc_attr($submission->payment_method))); 
         $wppayform_image_url = WPPAYFORM_URL . 'assets/images/gateways/' . $wppayform_payment_method .'.svg';
        ?>
        <div class="wpf_payment_info_item wpf_payment_info_item_payment_method">
            <div class="wpf_item_heading"><?php esc_html_e('Payment Method:', 'wp-payment-form'); ?></div>
            <div class="wpf_item_value"><strong><?php echo esc_html(ucfirst($submission->payment_method)); ?></strong></div>
            <?php if (!empty($submission->transactions)  && count($submission->transactions) > 0): 
                 $wppayform_transaction = $submission->transactions[0];
                 if (!empty($wppayform_transaction->card_last_4)):
                ?>
                <div class="wpf_transactions_card_number" style="margin-top:5px;">
                    <?php echo  '***'. esc_html($wppayform_transaction->card_last_4); ?>
                </div>
                <?php endif; ?>
            <?php endif; ?>
        </div>
    <?php endif; ?>
    <?php if ($submission->payment_status) : 
        $wppayform_payment_status = lcfirst(strtolower(esc_attr($submission->payment_status))); 
        $wppayform_image_url = WPPAYFORM_URL . 'assets/images/payment-status/' . $wppayform_payment_status .'.svg';
        ?>
        <div class="wpf_payment_info_item wpf_payment_info_item_payment_status">
            <div class="wpf_item_heading"><?php esc_html_e('Payment Status:', 'wp-payment-form'); ?></div>
            <div class="wpf_item_content <?php echo esc_attr($wppayform_payment_status) ?>">
                <div class="wpf_item_value"><?php echo esc_html(ucfirst($submission->payment_status)); ?></div>
            </div>
        </div>
    <?php endif; ?>
</div>
