Custom/Pay/Model/Custom_pay_Model_Paymodel.php
<?php
class Custom_Pay_Model_paymodel extends Mage_Payment_Model_Method_Abstract {
protected $_code = 'pay';
protected $_isInitializeNeeded = true;
protected $_canUseInternal = true;
protected $_canUseForMultishipping = false;
// define variable to add a custom form for payment method in checkout
protected $_formBlockType = 'pay/form_pay';
//this is the function to get the data in the custom form
public function assignData($data)
{
Mage::log($data->getPayInstallment());
}
public function getOrderPlaceRedirectUrl() {
return Mage::getUrl('pay/payment/redirect', array('_secure' => true));
}
}
Custom/pay/Block/Form/Pay.php
<?php
class Custom_Pay_Block_Form_Pay extends Mage_Payment_Block_Form
{
protected function _construct()
{
parent::_construct();
$this->setTemplate('pay/form/pay.phtml');
}
}
design/frontend/base/template/pay/form/pay.phtml
<ul class="form-list" id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none;">
<li>
 
</li>
<li>
<input type="radio" style="margin-left: 20px;" id="paysix" name="payment[pay_installment]" value="6" checked>
<label for="paysix" style="float:left">6 Months</label>
<input type="radio" style="margin-left: 10px;" id="paytwelve" name="payment[pay_installment]" value="12">
<label for="paytwelve">12 Months</label>
</li>
</ul>
Using the above code i showed a custom form for the payment method with 2 radio buttons. Then in the assign data function i added it to the Mage::Registry
and took it from the block which i created the request form and created the form according to the selected values.
Best Answer
In your Model/Standard.php, add one more protected variable,
protected $_canUseCheckout = true;
This should show the payment method in frontend.
FYI,
$_canUseInternal
when set is used to display payment method in backend.