<?php

/**
 * @var array $transaction
 */

use Sibs\Stargate\Core\SibsGeneralFunctions;

defined('ABSPATH') || exit;

function aditionalInformation()
{
    $info = '';
    if (!empty($additional_information) && is_array($additional_information)) {
        foreach ($additional_information as $info_name => $info_value) {
            $info .= '<strong>'.esc_attr(SibsGeneralFunctions::sibs_translate_additional_information($info_name)).': </strong>';
            $info .= esc_attr($info_value).'<br/>';
        }
    }

    return $info;
}
?>
<div class="sibs_payment_information">
	<h3>
		<?php echo esc_attr(__('Payment Information', 'sibs-woo-stg')); ?>
	</h3>
	<div class="information">
		<p>
			<strong><?php echo esc_attr(__('Payment Method', 'sibs-woo-stg')); ?>: </strong>
            <?php echo esc_attr(SibsGeneralFunctions::sibs_translate_backend_payment($transaction['payment_id'] ?? '')); ?> <br/>

            <strong><?php echo esc_attr(__('Transaction ID', 'sibs-woo-stg')); ?>: </strong>
            <?php echo esc_attr($transaction['reference_id'] ?? ''); ?> <br/>

            <strong><?php echo esc_attr(__('Currency', 'sibs-woo-stg')); ?>: </strong>
            <?php echo esc_attr($transaction['currency'] ?? ''); ?> <br/>

            <strong><?php echo esc_attr(__('Amount', 'sibs-woo-stg')); ?>: </strong>
            <?php echo esc_attr($transaction['amount'] ?? ''); ?> <br/>

            <?php echo aditionalInformation(); ?>
		</p>
	</div>
</div>