<?php
/* Smarty version 3.1.48, created on 2025-03-31 22:45:49
  from '/home/linq/public_html/clients/templates/six/payment/card/select.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.48',
  'unifunc' => 'content_67eb1b1dc5ca49_36314180',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '22aa19dfe787a49ac6d462c270b2bd5754c1131c' => 
    array (
      0 => '/home/linq/public_html/clients/templates/six/payment/card/select.tpl',
      1 => 1727738244,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_67eb1b1dc5ca49_36314180 (Smarty_Internal_Template $_smarty_tpl) {
if (count($_smarty_tpl->tpl_vars['existingCards']->value) > 0) {?>
    <div class="three-column-grid">
        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['existingCards']->value, 'cardInfo');
$_smarty_tpl->tpl_vars['cardInfo']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['cardInfo']->value) {
$_smarty_tpl->tpl_vars['cardInfo']->do_else = false;
?>
            <?php $_smarty_tpl->_assignInScope('payMethodExpired', 0);?>
            <?php $_smarty_tpl->_assignInScope('expiryDate', '');?>
            <?php $_smarty_tpl->_assignInScope('payMethod', $_smarty_tpl->tpl_vars['cardInfo']->value['payMethod'] ,true);?>
            <?php if ($_smarty_tpl->tpl_vars['payMethod']->value->payment->isExpired()) {?>
                <?php $_smarty_tpl->_assignInScope('payMethodExpired', 1 ,true);?>
            <?php }?>
            <?php if ($_smarty_tpl->tpl_vars['payMethod']->value->payment->getExpiryDate()) {?>
                <?php $_smarty_tpl->_assignInScope('expiryDate', $_smarty_tpl->tpl_vars['payMethod']->value->payment->getExpiryDate()->format('m/Y') ,true);?>
            <?php }?>

            <div class="paymethod-info" data-paymethod-id="<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                <input
                        id="existingCard<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
"
                        type="radio"
                        name="ccinfo"
                        class="existing-card icheck-button"
                        data-billing-contact-id="<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['billingcontactid'];?>
"
                        <?php if ($_smarty_tpl->tpl_vars['cardOnFile']->value && !$_smarty_tpl->tpl_vars['payMethodExpired']->value && $_smarty_tpl->tpl_vars['payMethodId']->value == $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid']) {?>
                            <?php ob_start();
echo $_smarty_tpl->tpl_vars['cardInfo']->value['billingcontactid'];
$_prefixVariable1 = ob_get_clean();
$_smarty_tpl->_assignInScope('preselectedBillingContactId', $_prefixVariable1 ,true);?>
                            checked="checked" data-loaded-paymethod="true"
                        <?php } elseif (($_smarty_tpl->tpl_vars['cardOnFile']->value && $_smarty_tpl->tpl_vars['payMethodExpired']->value) || !$_smarty_tpl->tpl_vars['cardOnFile']->value) {?>
                            disabled="disabled"
                        <?php }?>
                        <?php if (!$_smarty_tpl->tpl_vars['hasRemoteInput']->value) {?>onclick="hideNewCardInputFields();"<?php }?>
                        value="<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
"
                >
            </div>
            <div class="paymethod-info" data-paymethod-id="<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                <label for="existingCard<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                    <i class="<?php echo $_smarty_tpl->tpl_vars['payMethod']->value->getFontAwesomeIcon();?>
"></i>
                </label>
            </div>
            <div class="paymethod-info" data-paymethod-id="<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                <label for="existingCard<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                    <?php echo $_smarty_tpl->tpl_vars['payMethod']->value->payment->getDisplayName();?>

                </label>
            </div>
            <div class="paymethod-info" data-paymethod-id="<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                <label for="existingCard<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                    <?php echo $_smarty_tpl->tpl_vars['payMethod']->value->getDescription();?>

                </label>
            </div>
            <div class="paymethod-info" data-paymethod-id="<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                <label for="existingCard<?php echo $_smarty_tpl->tpl_vars['cardInfo']->value['paymethodid'];?>
">
                    <?php echo $_smarty_tpl->tpl_vars['expiryDate']->value;?>

                    <?php if ($_smarty_tpl->tpl_vars['payMethodExpired']->value) {?><br><small><?php echo $_smarty_tpl->tpl_vars['LANG']->value['clientareaexpired'];?>
</small><?php }?>
                </label>
            </div>
        <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
    </div>
<?php }?>
<div class="paymethod-info">
    <label>
        <input id="newCCInfo" type="radio" class="icheck-button" name="ccinfo" value="new" <?php if ($_smarty_tpl->tpl_vars['payMethodId']->value == "new" || !$_smarty_tpl->tpl_vars['cardOnFile']->value) {?> checked<?php }?> /> <?php echo $_smarty_tpl->tpl_vars['LANG']->value['creditcardenternewcard'];?>

    </label>
</div>
<?php }
}
