title: how to add custom fields in magento payment module
body: <p>I have downloaded a module from a blog and it works fine. but i need to add two more text boxes.</p>
  
  <pre><code> class Excellence_Pay_Block_Info_Pay extends Mage_Payment_Block_Info
      {
          protected function _prepareSpecificInformation($transport = null)
          {
              if (null !== $this-&gt;_paymentSpecificInformation) {
                  return $this-&gt;_paymentSpecificInformation;
              }
              $info = $this-&gt;getInfo();
              $transport = new Varien_Object();
              $transport = parent::_prepareSpecificInformation($transport);
              $transport-&gt;addData(array(
                  Mage::helper('payment')-&gt;__('Voucher #') =&gt; $info-&gt;getCheckNo(),
                  Mage::helper('payment')-&gt;__('Voucher Date') =&gt; $info-&gt;getCheckDate(),
                  Mage::helper('payment')-&gt;__('Field Date') =&gt; $info-&gt;getCheckField(), //custom field
                  Mage::helper('payment')-&gt;__('Field new') =&gt; $info-&gt;getCheckField1() //custom field
              ));
              return $transport;
          }
      }
  
  I change the code to this in block/info, and change some code in model/pay.php
  
  
  
  
  public function assignData($data)
          {
              if (!($data instanceof Varien_Object)) {
                  $data = new Varien_Object($data);
              }
              $info = $this-&gt;getInfoInstance();
              $info-&gt;setCheckNo($data-&gt;getCheckNo())
              -&gt;setCheckDate($data-&gt;getCheckDate())
              -&gt;setCheckField($data-&gt;getCheckField())
              -&gt;setCheckField1($data-&gt;getCheckField1());
              return $this;
          }
  </code></pre>
  
  <p>and add some code etc/config.xml</p>
  
  <pre><code>&lt;fieldsets&gt;
               &lt;sales_convert_quote_payment&gt;
                  &lt;check_no&gt;
                      &lt;to_order_payment&gt;*&lt;/to_order_payment&gt;
                  &lt;/a&gt;
                  &lt;check_date&gt;
                      &lt;to_order_payment&gt;*&lt;/to_order_payment&gt;
                  &lt;/check_date&gt;
                  &lt;check_field&gt;
                      &lt;to_order_payment&gt;*&lt;/to_order_payment&gt;
                  &lt;/check_field&gt;
                  &lt;check_field1&gt;
                      &lt;to_order_payment&gt;*&lt;/to_order_payment&gt;
                  &lt;/check_field1&gt;
               &lt;/sales_convert_quote_payment&gt;
          &lt;/fieldsets&gt;
  </code></pre>
  
  <p>but its not functioning. . I also updated the database and add some input textbox in pay.phtml.</p>