自动检查单选按钮

I'm trying to edit a form so that when I open it, a radio button is selected for me. I've tried several options and have gotten the button to select but, when submitting the form, it acts as if the radio button isn't selected.

Any ideas?

<div class="col-md-<?php $this->Html->_($column_widths);?>">
    <h4><?php echo $this->Html->ifSet($options_heading);?></h4>
    <?php
    // Set non-merchant gateways
    foreach ($this->Html->ifSet($nm_gateways, []) as $gateway) {
    ?>
        <div class="radio">
            <label>
                <?php
                $this->Form->fieldRadio('gateway', 'checked', $this->Html->ifSet($gateway->id), ($this->Html->ifSet($vars->pay_with) == $this->Html->ifSet($gateway->id)), ['class' => 'gateway']);
                $this->Html->_($gateway->name);
                ?>
            </label>
        </div>
    <?php
    }
    ?>
</div>