Magento Create Custom Payment Method

credit-card
In this blog post, we are going to see the basics of how to create a new payment method.

We will first see a very basic version of the payment method i.e it won’t have any payment gateway integration (e.g Cash on Delivery). Next, we will see how to create a little advanced version where we will see how to show a form for the payment method and save the values to database.

Basic Payment Method

Here is a screenshot of how the payment method will look like

Custom Payment Method

Custom Payment Method


As you can see its the most basic version, where only title of payment method show up. Now lets see what are all the steps to do this. Create a payment method is almost same as shipping method. We need to edit the files system.xml, config.xml and create a model class for the payment method. Before starting with a payment method, first we need to decide on a unique code for the payment method, in my i have chosen the code to be ‘pay’ and name of my module is Excellence_Pay.
system.xml
Create a system.xml file inside your module’s etc folder. The content of the system.xml file are

<?xml version="1.0" encoding="UTF-8"?>
<config>
   <sections>
        <payment>
            <groups>
                <pay translate="label" module="pay">
                    <label>Excellence Payment Module</label>
                    <sort_order>670</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>0</show_in_store>
                    <fields>
                        <active translate="label">
                            <label>Enabled</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </active>
                        <order_status translate="label">
                            <label>New order status</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_order_status_processing</source_model>
                            <sort_order>2</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </order_status>
                        <title translate="label">
                            <label>Title</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>3</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </title>
                    </fields>
                </pay>
            </groups>
        </payment>
    </sections>
</config>

the important thing to notice here is

<config>
   <sections>
        <payment>
            <groups>
                <pay translate="label" module="pay">

The xml path is required for all payment method i.e it needs to be inside the <payment> tag and <pay> here is our payment method’s code. The above xml will create fields in the System->Configuration->Payment Methods as shown

config.xml
Next in our module config.xml file we need to put in default values for the fields created in system.xml. Here is the code to put in config.xml directly inside the <config> tag.

<default>
        <payment>
            <pay>
                <active>1</active>
                <model>pay/pay</model>
                <order_status>processing</order_status>
                <title>Excellence Payment Method</title>
            </pay>
         </payment>
    </default>

Here is the important thing to note is the <model> tab which has the classpath of the payment method model class.
Model Class
Next we will create the model class for our payment method at location Excellence_Pay_Model_Pay, as mentioned in the config.xml <model> tag.

<?php
class Excellence_Pay_Model_Pay extends Mage_Payment_Model_Method_Abstract
{
	protected $_code = 'pay';
}
?>

This is all that is required to create a simple payment method. Attached is source code of this module
Module Name: Basic Payment Method Source

Payment Method with Form Fields

We will now see how to create a payment method with form fields, this is a bit more complex than what we created above. Here is a screenshot of the payment method

Magento Custom Payment Method

Magento Custom Payment Method


As you can see in the screenshot, the title of the payment method is “Pay by Check” and it has two fields Check No and Check Date. These fields are entered by the user and saved to the database for order processing. I will use the same module as above, so only the new files created will be explained in this section. Attached is the source code for this section
Module Name: Payment Method Form Based

Step1
First we will see how to add the form html to the payment method. That is, when we click on ‘Pay by Check’ it show the two form fields. To do this in our payment model class Excellence_Pay_Model_Pay we will add a variable

protected $_formBlockType = 'pay/form_pay';

This variable has the path of the block class which contains form. The code written in the block class is

<?php
class Excellence_Pay_Block_Form_Pay extends Mage_Payment_Block_Form
{
	protected function _construct()
	{
		parent::_construct();
		$this->setTemplate('pay/form/pay.phtml');
	}
}

This is simple, it just basically sets the template of the form to be ‘pay/form/pay.phtml’. In the pay.phtml file the code written is

<?php $_code=$this->getMethodCode() ?>
<ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
    <li>
        <label for="<?php echo $_code ?>_check_no" class="required"><em>*</em><?php echo $this->__('Check No#') ?></label>
        <span class="input-box">
            <input type="text" title="<?php echo $this->__('Check No#') ?>" class="input-text required-entry" id="<?php echo $_code ?>_check_no" name="payment[check_no]" value="<?php echo $this->htmlEscape($this->getInfoData('check_no')) ?>" />
        </span>
    </li>
    <li>
        <label for="<?php echo $_code ?>_check_date" class="required"><em>*</em><?php echo $this->__('Check Date:') ?></label>
        <span class="input-box">
            <input type="text" title="<?php echo $this->__('Check Date:') ?>" class="input-text required-entry" id="<?php echo $_code ?>_check_date" name="payment[check_date]" value="<?php echo $this->htmlEscape($this->getInfoData('check_date')) ?>" />
        </span>
    </li>
</ul>
<div>
	<?php echo $this->getMethod()->getConfigData('message');?>
</div>

The <ul> tag width id ‘payment_form_<?php echo $_code ?>’ is important. Since we have made it display:none by default, it won’t show when the payment step is loaded. But when we click on the ‘Pay by Check’ option the <ul> tag will automatically have display:block. This is all that is required to make the form block show up. The important thing to remember is that protected $_formBlockType = ‘pay/form_pay'; is used for showing the form
Step2
After we have created the form, we need to make sure the values go into the database and are visible in Admin -> Sales -> Orders. So here we will see how to save the form fields to database and also how to validate the fields. In our payment method model class Excellence_Pay_Model_Pay we will add two function

public function assignData($data)
	{
		if (!($data instanceof Varien_Object)) {
			$data = new Varien_Object($data);
		}
		$info = $this->getInfoInstance();
		$info->setCheckNo($data->getCheckNo())
		->setCheckDate($data->getCheckDate());
		return $this;
	}


	public function validate()
	{
		parent::validate();

		$info = $this->getInfoInstance();

		$no = $info->getCheckNo();
		$date = $info->getCheckDate();
		if(empty($no) || empty($date)){
			$errorCode = 'invalid_data';
			$errorMsg = $this->_getHelper()->__('Check No and Date are required fields');
		}

		if($errorMsg){
			Mage::throwException($errorMsg);
		}
		return $this;
	}

The function assignData($data) is called, when we click the ‘Continue’ button in the checkout Payment Step. The $data variable has our fields data in it, so in the assignData function, we get the information from $data variable in assign to a object called $this->getInfoInstance(). The $this->getInfoInstance() returns an object of class Mage_Payment_Model_Info, this object is used in many places and is considered to have the information of a payment method.
Next we have validate() function, it is clear from the name it is used to validate the form fields data and check if they meet the business requirement or not.
Now, to store these two fields in the database, we need to create columns for these. By default in magento payment method fields are stored in two tables
‘sales_flat_quote_payment’ and ‘sales_flat_order_payment’. If you see the existing structure of the tables, these have many column for store credit cart info, purchase order no, etc which are default magento payment methods. Now, we need to add 2 more columns to both these table for our fields i.e check_no and check_date.
So in your mysql install file put in this sql code

<?php
$installer = $this;
$installer->startSetup();
$installer->run("

ALTER TABLE `{$installer->getTable('sales/quote_payment')}` ADD `check_no` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `{$installer->getTable('sales/quote_payment')}` ADD `check_date` VARCHAR( 255 ) NOT NULL ;

ALTER TABLE `{$installer->getTable('sales/order_payment')}` ADD `check_no` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `{$installer->getTable('sales/order_payment')}` ADD `check_date` VARCHAR( 255 ) NOT NULL ;

");
$installer->endSetup();

Next we need to make another change to our config.xml file, inside the <global> tag put in this xml

<fieldsets>
    		 <sales_convert_quote_payment>
    		 	<check_no>
    		 		<to_order_payment>*</to_order_payment>
    		 	</check_no>
    		 	<check_date>
    		 		<to_order_payment>*</to_order_payment>
    		 	</check_date>
    		 </sales_convert_quote_payment>
    	</fieldsets>

Once the above steps are done the two form fields, we be stored to quote and order database perfectly and should be visible in Admin -> Sales -> Order as well.
Step3
This is last thing remaining for the payment method, that is the information block. This info block is used in many places, it is basically the information of the payment method that shows up in progress area, order email, my account -> order area, admin order area etc. Attached are screenshot of where the info block shows up

Payment Method Info Block Admin

Payment Method Info Block Admin

Payment Method Info Block MyAccount

Payment Method Info Block MyAccount

Payment Method Info Block Progress

Payment Method Info Block Progress

To create the info block we need to put this variable inside our payment method model.

protected $_infoBlockType = 'pay/info_pay';

This variable has the block class path of the info block. The code inside the info block is

<?php
class Excellence_Pay_Block_Info_Pay extends Mage_Payment_Block_Info
{
	protected function _prepareSpecificInformation($transport = null)
	{
		if (null !== $this->_paymentSpecificInformation) {
			return $this->_paymentSpecificInformation;
		}
		$info = $this->getInfo();
		$transport = new Varien_Object();
		$transport = parent::_prepareSpecificInformation($transport);
		$transport->addData(array(
			Mage::helper('payment')->__('Check No#') => $info->getCheckNo(),
			Mage::helper('payment')->__('Check Date') => $info->getCheckDate()
		));
		return $transport;
	}
}

The _prepareSpecificInformation() is basically called by magento, to get an object which has the information we need to display.
The default phtml file used to display this information is ‘app\design\frontend\base\default\template\payment\info\default.phtml’ but if you want to have a custom design you can specify a different phtml file in the block constructor like this

protected function _construct() // sample code, not used in current module.
    {
        parent::_construct();
        $this->setTemplate('payment/info/purchaseorder.phtml'); 
    }

These are all the steps required to create a payment method with form fields.

We have seen in this blog post, how to create basic payment methods, in the next upcoming blog post we will see how to create payment method with payment gateway api integration.
  • xavi

    Hi This is great. For some reason I download the files, then copy them, but I do not get to see the option in the payment methods, and it is not a matter of cache as I have disable it. What else do I have to do in order to get it working. I am using the form method.

  • Mehdiwv

    Hi Manish,

    First thank you for the help, just need to know how to add the file that i download from your blog to my magento.

    Thanks

    • Manish Prakash

      It’s a standard module install.

      Just upload all files you have download into their respective folders in your magento

      • Daivu Acet

        sir,

        where i have to add merchant id etc… here is a simple checkout with excellence payment method…

        ebs payment gateway gives a id.. where i have to put this???

        thanks

        • Manish Prakash

          This tutorial only shows you basics of how you can create your own payment method.

          For each payment method, there is different api settings which needs to be programmed separately and are not included In this tutorial.

          • shahedbd

            HI Manish

            I have been trying to use your module, it works at first step including the fields input, but i it is not going to second step. Just redirecting on to the form again.
            I am using ajax one page checkout. Also i cant download your second file, Please guide me and send me the second code here : smtapu@gmail.com thanks.

        • Daivu Acet

          thanks but can you tell me where i have to got these code??? actually i have no more idea about core programming…

          thanks again.

          • Manish Prakash

            It would be difficult if you don’t have advanced magento knowledge. It’s better you hire some one to do this or maybe you search magento free modules in magento connect and try to edit those.

  • Mehdiwv

    Thanks Manish, i’ll try it tonight . thanks for everything :)

  • Mehdiwv

    Hi Manish,

    Everything works, Great Help . when will you post the payment method with payment gateway api integration?

    • Manish Prakash

      I will post that soon.

  • Larry Sainte-Marie

    Manish, is it possible to configure a simple pay method – like checkmo to make the new orders go directly to the order ‘state’ of processing with processing’s default order status but without making an invoice?

    My goal is to make checkmo orders have the same state and status as my CC orders, so that other functions I have integrated treat both in the same way. 

    • Manish Prakash

      I will write a blog on this in future.

      I researched this and the steps to do this is a little complex because an auto generated invoice needs to be created for an order to go to processing state.

  • Ajendraleonet

    Hi Manish,

    Thnks for the help.I have created a module with the help of this tutorial every thing working fine.i want to create one more module like this plz help.

  • renta

    I have the same problem as xavi. I don’t see new method in “Payment Methods” in Magento admin after the code installing. Magento cache is disabled. Version – 1.6.1.0

    • Manish Prakash

      Is the module installed properly.
      In Admin -> System -> Configuration -> Advanced 

      is the module showing up?

  • http://twitter.com/hybrisCole Alberto Cole

    Hey Manish, if you could find a workout to make this be linked with Skipjack API integration would be just great :),

    Regards,

    • Manish Prakash

      Ok, I will checkout what this is. But it might take time before I can do this as I am busy with other things right now. But I will add this to my to do list.

      Regards

  • iamkalai

    can you help me to ccavenu mageno module…

    • Manish Prakash

      Do you have access to their live account?

  • Khalid

    How i can implement paypal adaptive payment method in magento?

    • sibi

      I am new to magento development.
      How to build a multi-seller Magento site in which customer can pay direct payment to the seller PayPal account.

  • Benoit_harter

    Hi Manish,
    Thank you very much for this post but I don’t understand how do you use setCheckNo and getCheckNo in the assignData function…can’t you give me some details please?
    Thanks

  • Anonymous

    Hi Manish,
    Thank you very much for this post but I don’t understand how do you use setCheckNo and getCheckNo in the assignData function…can’t you give me some details please?
    Thanks

  • Vibha Jadwani

    However I have added 3 extra fields in database (using phpmyadmin) and coding (wherever 2 field code was there).
    Now facing one issue. When i am at the last step of checkout and click on ‘Place Order’ i am getting “All are required fields” js error. I think the values are not being set. I know you can’t jugde without code but then also any hint?

    • Manish Prakash

      Try to “Flush Magento Cache” and “Flush Cache Storage”

    • http://twitter.com/khanh_vu14 Vu duy Khanh

      you add new field follow way of Manish Prakash … but in pay_setup…
      but you change file …mysql4-install-0.1.0.php to mysql4-upgrade-0.1.0-0.2.0.php …in this file you only put new filed into this file ( ex : alter table…. third_field in after start function and before end function or replace code of Mnaish Prakash )….
      – go to app/ect/modules/ find Excellent_pay.xml change version 0.1.0 to 0.2.0 .
      Finally you re-clear cache .

  • Roshan Deshapriya

     Hay Manish, Nice tutorial well done, i’m in Kuwait, currently i’m working on a project for a kuwaiti company using Magento, In kuwait they have a local payment system called ” Knet ” , my client need to include it to his site, but the knet company  do not php modules they told me to use php java bridge, i try all the tutorials in Magento wiki  about the custom payment module but it’s not showing in payment methods, can you tell me how fix this and how to connect magento with php java bridge.
    http://www.magentocommerce.com/wiki/5_-_modules_and_development/payment/create-payment-method-module#introduction

  • Kunmi Shebafoods

    Hi Manish, 

    This tutorial sounds great and I’ll like to try it.  I could not download the source files above.  Can you please send it to me. 

    Download: Basic Payment Method Source(4.54KB)  

    Download: Payment Method Form Based(9.47KB) 

    Thanks for your attention.

  • http://twitter.com/mancrusrl MANCRU SRL

    Hi Manish, Great tutorial! I’m trying to create a basic, but when i use your Module, i get an sql error and among all magento site. (i’m working in a local instalation) could be my Magento version? I’m using 1.6.2.0
    Thx!

  • Vandai079

    Hi 
    Manish Prakash

    what is the difference table ‘sales_flat_quote_payment’ and ‘sales_flat_order_payment’ ?
    Regards, 

    • Manish Prakash

      Quote table is used when product are added to cart.

      Order table is used after checkout, i.e order is placed.

      • Vandai079

        Hi, Thanks for you answer  :)

        I have another question:
        What is the typical structure of the payment method module?
        Regards, 

  • Kunmi Shebafoods

    Hi Manish,

    HELP!  I changed module, block and field names making sure all the files got the same field name changes. For example “Excellent” became “Awesome” , “Pay or pay” became “Buy or buy”. Payment method shows ONLY in the backend/admin and not in front for customers.  Please tell me which file controls the front view.  I think it is /etc/config.xml and I have gone through it, line by line, comparing it to yours, making sure name changes are following your format. 

    Please tell me which other files to review to be sure my changes are consistent.

    Thanks.

  • Kunmi Shebafoods

    I have spent over 3 weeks on this payment module only because I am very new to magento.  I also needed to add another text box and discovered you much add it in many of the files in the Payment Method form zip.

    Here is my humble opinion, use it carefully. 
    1.  Go through all the files in the zip file and everywhere you find the check_no, or check_amount, you can duplicate one of them to create the code for the 3rd box.
    ::  for example in the pay.phtml it shows

      
            <label for="_check_no” class=”required”>*__(‘Check No#’) ?>
           
                <input type="text" title="__(‘Check No#’) ?>” class=”input-text required-entry” id=”_check_no” name=”payment[check_no]” value=”htmlEscape($this->getInfoData(‘check_no’)) ?>” />
           
       
       
            <label for="_check_date” class=”required”>*__(‘Check Date:’) ?>
           
                <input type="text" title="__(‘Check Date:’) ?>” class=”input-text required-entry” id=”_check_date” name=”payment[check_date]” value=”htmlEscape($this->getInfoData(‘check_date’)) ?>” />
           
       

    here is the new addition
      

            <label for="_third_box”
    class=”required”>*__(‘Third Box:’) ?>

           

                <input type="text" title="__(‘Third Box:’) ?>” class=”input-text required-entry”
    id=”_third_box” name=”payment[third_box]”
    value=”htmlEscape($this->getInfoData(‘third_box’)) ?>” />

           

       

    don’t forget to go into every file that has reference to check_no or CheckNo and add code for third_box or ThirdBox()

    2. Go into your magento database with phpmyadmin and run a query to add the field. The mysql file did not work for me, it did not add the columns so I did something like this.
    ALTER TABLE `sales_flat_quote_payment` ADD `third_box` VARCHAR( 255 ) NOT NULL ;
    ALTER TABLE `sales_flat_order_payment` ADD `third_box` VARCHAR( 255 ) NOT NULL ;
    AGAIN, am no expert, still learning so please backup your work before you try my suggestion.  I hope it helps you out.

    Maybe you can help me.  I no longer see my payment method on the frontend.   Tomorrow, I start the painstaking journey of making one change at a time to see what made it stop.  Any suggestion will be appreciated.

    Thanks.

  • Dolen8267

    Hi Manish,

    It’ll be very thankfull, it you explain the payment gateway integration module like CCAvenue, Ebs etc.

  • Elvis Presley Cro

    Hi. I am wondering how to extend Abstract class with an cc class. I have in one module 2 different payment types. Core class handling those two is extended Abstract. But second one need to be cc class. And also second one is the extend of the core one. I am confused how to handle this.

  • ajix

     I am using 1.5 what was the solution to this because getting same error.  Or were you able to resolve this

  • ajix

     i am using 1.5 and have the same error.  what did you do to resolve it

  • http://www.facebook.com/people/Sachin-Tekdi/100002455407756 Sachin Tekdi

    Hi

    using the Form Based payment method
    but getting following error alert

    Notice: Undefined variable: errorMsg  in /home/rohan/html/mage_13/app/code/local/Excellence/Pay/Model/Pay.php on line 33

    on Magento 1.3

    please can you take a look on this

    Thanks..

    • http://www.facebook.com/people/Sachin-Tekdi/100002455407756 Sachin Tekdi

      Is there any one who can help on this

      thanks….

  • Pamper Me

    When the Excellence Pay method is active AND product type is VIRTUAL, one page checkout is stuck on Billing Information.  It never gets to Payment Information. 

    When I delete all the Excellence Pay files off the server, all payment methods show for ALL product types including VIRTUAL products.

    Please tell me how to fix this.

    Thanks.

  • Rajendra Mahajan

    Can you please tell me how to create 3d secure payment module….Thanks

  • http://profile.yahoo.com/GPA4X2VMKBJASKS6YE73L5FLSQ Rajendra

    Can you please tell me how to create 3d secure payment module….Thanks

  • http://www.facebook.com/niraj.bhoot Niraj Bhoot

    Hi Manish

    Need help regarding Method with Form Fields..
    I have added two more extra fields.

    When i pass through payment method its redirecting me to cart page instead go to next review step..

  • http://www.facebook.com/eevbakhavbokun Esi Evbakhavbokun

    How do I implement a payment method that redirects to another website?  In my case, we do not want any values to be entered by the user, just a redirection to another secure website where payment details are then captured by the third party website and then a redirect back to our website.  How do I implement this?

    • Patricio Felipe Cáceres Gutier

      You can search for khipu module

  • http://www.facebook.com/vinciane.tjong Vinciane Zhang

    Hi 
    Manish,

    I apply this method to my module, but when I press continue button, my fields didn’t saved to ‘sales_flat_quote_payment’ and I think to save them, I just need added this code to config.xml didn’t I?
                                                     *                                                    *                                     

  • srikanth thandra

    I am getting an error saying magento unable to set payment method how do i solve it

  • http://www.facebook.com/praful.rajput Praful Rajput

    Really very nice achievement!!!

    I want to implement CcAvenue Payment Gateway. I have kit of Cc Avenue in PHP.

    But i dont have idea how to implement the same in Magento. pls help me out,,

  • Dogan

    how can i change the state of order or is there any way to create a invoice with statement as paid for this payment methode ?

  • sachin
  • sachin

    any problem in magento..contact me…

  • maxxebiz

    Can you take care of the implementation for us? what cost?

  • Diogo Santiago

    Hi Manish,

    Can you clear this parts, im trying to understand some of the unique tags like in this case sales_convert_quote_payment, and some other like , , etc…

    *

    *

  • Stevan

    Hi Manish,
    I implemented your source(download), the option appeared but the fields are not visible.
    Thanks,
    Stevan

  • disqus_kaeoAUHV8c

    Very very useful extension… I super like it…. Thanks Manoj

  • http://www.facebook.com/jose.davila.39589 José Dávila

    Hello, i try to download the second example, but there isn´t any link to do it, i log in with facebook, but it doesn´t work. I woudl like to know how i do to add a web service funtion to the pymemnt method. Thanks.

  • http://www.facebook.com/jose.davila.39589 José Dávila

    Hello, somebody can send me the example using form by email? desarrollo@hipertexto.com.co. Thanks.

  • Tommy

    The payment method info is not showing with magento 1.7. Is there a solution for this issue? thx

  • http://www.facebook.com/srikanth.thandra.5 Srikanth Thandra

    Hi,

    I am not able to download the payment method with form. http://awesomescreenshot.com/020w1pge5

    Thanks & Regards,
    Srikanth Thandra

  • Javier Fernández

    Hi Manish,

    I follow your tutorial step by step but at the end of step 2 i cant see nothing on Sales Order. However, the information is stored in DDBB (sales_flat_order_payment and sales_flat_quote_payment).

    Any idea what could be wrong?

  • Kevin Javitz

    hi,

    can someone email me the base payment module? The second download link doesn’t work even when I login with facebook thanks. kjavitz@itwebexperts.com

  • khushbu

    when is specification of getCheckNo() & getCheckDate() methods

  • khushbu

    i am not able to download second example please send me on khushbu.shah9@gmail.com

    • http://www.facebook.com/arvind498 Arvind Sharma

      Even I am unable to download the second example. Please send me it via email: raghu.bhat2000@gmail.com

  • Adrian Rosian

    If you ever come to Romania, I owe you a beer! Big thank you!

  • Magento Developer

    Thanks a lot,
    I need to create one payment method, but I couldn’t find good way. But using this I create a method in 2 hours.
    Thanks again.

  • emmanuel onuoha

    used this and i get this error Order saving error: Notice: Undefined variable: errorMsg in /var/www/app/code/local/OnPice/CheckPayment/Model/Method/Pay.php on line 59
    WHY IS THIS? i really don’t get it?

    here is the code

    public function validate()

    {

    parent::validate();

    $info = $this->getInfoInstance();

    $no = $info->getCheckNo();

    if(empty($no)){

    $errorCode = ‘invalid_data';

    $errorMsg = $this->_getHelper()->__(‘Check Number is required’);

    }

    if($errorMsg){

    Mage::throwException($errorMsg);

    }

    return $this;

    }

  • http://www.facebook.com/hidegandras Hideg András

    Hi Manish,

    can you please tell me how can I use this solution multiple times? I need to have 8 different payment methods on a website. I copied the files to a new folder, changed everything that was “pay” or “Excellence” to another name, but in the admin I can only see one payment method at a time. If I delete the original Excellence files my copy won’t work.

    Please help me out, I am blocked here since yesterday 8pm…

  • http://www.facebook.com/arvind498 Arvind Sharma

    I am unable to download the second example… Please email me on raghu.bhat2000@gmail.com

  • Hitesh Pachpor

    Thanks a ton for this tutorial. Was much needed and it worked superbly! Thank you so very much, Manish :-)

    • Moahamed Mujahidh

      hi.
      if this task is worked for you,
      i need ur help . pls contact me(mujahidhaseem@gmail.com)

  • Vikas Arya

    Very very useful
    you are doing great work
    good bless you.

  • http://www.facebook.com/DeBaS1s Debasis Chakraborty

    excelent. working fine with 1.7 also

  • Krunal

    Hi Manish,

    Thanks a lot.

    I am using third party payment form, I generate it in step 5 of checkout and this form redirect me to other action.Then how can i can validate and place order?
    please help..

    Thanks

  • Krunal Palaniya

    can someone email me the base payment module? The second download link doesn’t work even when I login with facebook thanks. email: kp4net@gmail.com

  • karthicknmuddha

    I am unable to download the second one could you please send me in email karthibill@gmail.com

  • karthicknmuddha

    i am unable to download the second one please email me to karthibill@gmail.com

  • lalita

    Hi,

    Unable to download “Payment Method Form Based” module please help me out.

    Please give me link or send me this module on my email id ASAP.
    Thank you

  • braveheart

    To download second part just increment file id +1 from first download link.

    http://www.excellencemagentoblog. com/?file_id=21

  • sharfuddin

    give ur email id will send u the zip file of second example

  • sharfuddin

    give ur email id i will send u the zip file

  • Feno King

    I am not able to download the form based payment method even after logging via facebook. Please help!!!! urgent

  • Karan Yadav

    Very Important Example for Custom Install able Magento Extension…..

  • Mukesh

    Hi Manish,

    Could you please suggest how can I add additional status in the admin other than pending for this module.
    I want the order statuses which are under system>order statuses in the admin of magento
    Thanks

  • francocedillo

    Hi Manish. Form Based Payment Method is not saving Check No or Check Date

  • sibi

    I am new to magento development. I want to build a multi-seller Magento site in which customer can pay direct payment to the seller PayPal account. I searched for some extensions, but in most of them are not free to use. My requirement is that a customer can pay directly to seller, and send admin a notification that payment is done. So how can i develop such a module? Is there any free Magento extension for this? Any solution for this problem , thanks in advance.

  • Nirali Pandey

    assdaf

    • Nirali Pandey

      asdf

      • Nirali Pandey

        asdfsd

        • Nirali Pandey

          werwer

          • Nirali Pandey

            asd fasssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss

          • Nirali Pandey

            asdfasdf

  • sdf

    sdfsdfsfsdfsdf

  • Udom

    Hi. After install it from the package. I see a new payment module of excellent but in frontend, why it is not showed the typing field? but when I click to the next step, it alert that I haven’t fill in the requirement field. Please help me.

  • ÁiTân GiácLa Long Tamao

    Hi Manish! in the pay.phtml form i want to add a dropdown list and check it in validation() can you show me how to do this?

    i try with my code below bat it not work, help me plz:

    <label for="_payment_method” class=”required”>*__(‘Payment Method’) ?>

    <select class="dropdown"
    id="_card_type” name=”payment[card_type]” value=”htmlEscape($this->getInfoData(‘card_type’)) ?>”>
    Credit Card
    Debit Card

    • Sebastian David Vaquero

      Try this, it worked so perfect for me

      <label for="_check_no” class=”required”>*__(‘Cuotas’) ?>

      <select class="dropdown" id="_check_no” name=”payment[check_no]” value=”htmlEscape($this->getInfoData(‘check_no’)) ?>”>

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

  • Josh Koberstein

    The files that you add to /app/design/frontend/ also need to go in /app/design/adminhtml/

  • http://www.skymagento.com/ Farhan Islam

    What about admin side options?

    Provided covers frontend only.

  • Chris

    Have you, or anyone, ever tried to add the value of the Check No# box into the Order Grid?
    I’m trying to pull it in there but having some difficulties.