Devising a smooth payment method in an Ecommerce website is crucial in converting a casual visitor into a customer. Any unpleasant experience, especially in the payment process, will raise questions on the integrity and security of the website.

Magento provides a wide array of payment modules built-in with the system.  With the changing market scenarios, we have different kinds of payments methods and gateways in the market. In few instances, we have noticed that there are few unique payment gateways which require additional information for security. We were not able to find a suitable module in the marketplace. In such cases, it’s recommended to build a customized module that handles the complete information required for the payment gateway.

Let’s have a look at building one such customized payment gateway in Magento.


To begin, we need to create our own Namespace_Module.xml file with our code pool.

Create config.xml


Create system.xml file

Note: The Payment Module will just Store the Credit Card for further process.

In the config.xml file

and system.xml file

In all above three instances, paymentmethodname should be the same.

To display your payment method input fields. Create your own block and phtml file.

Finally create the payment model which will capture the credit card information and store for future use.

Implementing the above mentioned code creates a custom payment module which enables retailers to get the necessary data from the customers. Once the data has been obtained, developers need to work on the business logic to use the data in an efficient way.

In a recent study by Forrester, 24% of shopping cart abandonment happens due to limited payment options. With new payment options and gateways surfacing in the market, it’s necessary for retailers to provide adequate payment options to empower a successful purchase.

Magento 1 stores need to be PCI compliant to ensure data security of customers. Make your website PCI compliant by opting for Magento 1 to Magento 2 migration now. Let’s Talk.


  • Iyappan

    Iyappan is a Certified Magento Developer Plus Technical Architect at DCKAP. He is passionate about Magento. He is the 'go-to' guy for all our Magento needs. A cool-headed, hands-on veteran of many end-to-end implementations.


Ready to drive online revenue

Get In Touch