Showing results for 
Search instead for 
Did you mean: 

Migration from Magento 1.x to Magento 2.x

Migration from Magento 1.x to Magento 2.x



I am new to Magento, and i need to update payment plugin from version magento 1.9 to magento 2.


I am working very hard to get this done but I am reaching no where, Can anyone please help me in this regards? 


I changed some of the files and managed to see backend part of my module.  Now I am changing Block, .phtml,controller and Model to display our payment module to frontend on checkout page, but I am not seeing anything there. 

Could you please guide me what needs to be changed and why I am getting error?


And also whenever I change anything in files it doesn't reflect in front end. Every time I need to reinstall magento with updated changes in my module. What needs to be done there.


Your help will be really appreciated.


Thanks in advance,

Namita kapoor


Re: Migration from Magento 1.x to Magento 2.x

please check

1) Add a custom payment method to checkout ( ).

2) sample payment gateway module ( It will help you .

Re: Migration from Magento 1.x to Magento 2.x

Hi All,


Can anyone please help me? 




Re: Migration from Magento 1.x to Magento 2.x

Hi Namita( @WorldNet TPS)


Magento 2 is new for every user (for me too). You may face issues while learning it gradually you will learn it.

Did you try to create some sample custom modules before working on your extension work?


I suggest you to develop some sample modules according to your requirement. Like working with controllers, plugins, Observers etc in Magento 2. Once you are confident then again start to work on your extension.


I suggest you to go through following resources which may be helpful for you.

1) Magento 2 Developer Documentation

2) Magento 2 Developer’s Cookbook: Useful Code Snippets, Tips, and Note

3)The Ultimate Magento 2 Tutorial


For Magento 2 some good books are also available. You can use those for learning purpose.


For specific errors you should post separately so people may be able to answer those.



Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: Migration from Magento 1.x to Magento 2.x



Thank you so much for your responses and help. I tried to make sample Payment Module but I am not able to see my module on checkout page. My module is located in app/code/Mage/Worldnet. Below are my files to render the payment method on checkout page,


 <?xml version="1.0"?>
<page xmlns:xsi="" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceBlock name="checkout.root">
<argument name="jsLayout" xsi:type="array">
<item name="components" xsi:type="array">
<item name="checkout" xsi:type="array">
//other items tags here
<!-- merge payment method renders here -->
<item name="children" xsi:type="array">
<item name="worldnet-payments" xsi:type="array">
<item name="component" xsi:type="string">Mage_Worldnet/js/view/payment/worldnet</item>
<item name="methods" xsi:type="array">
<item name="worldnet" xsi:type="array">
<item name="isBillingAddressRequired" xsi:type="boolean">true</item>
**//closing items tags here



function (
) {
'use strict';
type: 'worldnet_standard',
component: 'Mage_Worldnet/js/view/payment/method-renderer/worldnet-standard'
/** Add view logic here if needed */
return Component.extend({});



[ 'jquery',
function ($, Component, setPaymentInformationAction, additionalValidators, fullScreenLoader) {
'use strict';

return Component.extend({
defaults: {
template: 'Mage_Worldnet/payment/worldnet-standard'
placeOrderHandler: null,
validateHandler: null,

setPlaceOrderHandler: function(handler) {
this.placeOrderHandler = handler;

setValidateHandler: function(handler) {
this.validateHandler = handler;

context: function() {
return this;

isShowLegend: function() {
return true;

getCode: function() {
return 'worldnet_standard';

isActive: function() {
return true;

* @override
placeOrder: function () {
var self = this;
this.selectPaymentMethod(); // save selected payment method in Quote
return false;





<div class="payment-method" data-bind="css: {'_active': (getCode() == isChecked())}">
<div class="payment-method-title field choice">
<input type="radio"
data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>
<label data-bind="attr: {'for': getCode()}" class="label"><span data-bind="text: getTitle()"></span></label>
<div class="payment-method-content">
<!-- ko foreach: getRegion('messages') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<div class="payment-method-billing-address">
<!-- ko foreach: $parent.getRegion(getBillingAddressFormName()) -->
<!-- ko template: getTemplate() --><!-- /ko -->

<form class="form" data-bind="attr: {'id': getCode() + '-form'}">
<!-- ko template: 'Magento_Payment/payment/cc-form' --><!-- /ko -->

<div class="checkout-agreements-block">
<!-- ko foreach: $parent.getRegion('before-place-order') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<div class="actions-toolbar">
<div class="primary">
<button class="action primary checkout"
click: placeOrder,
attr: {title: $t('Place Order')},
css: {disabled: !isPlaceOrderActionAllowed()},
enable: (getCode() == isChecked())
<span data-bind="text: $t('Place Order')"></span>



Please let me know what I am missing here. I am tired of searching this, please help me.



Re: Migration from Magento 1.x to Magento 2.x



Please help me with above query, also I want to know is there any other file which is responsible for rendering payment method on checkout page. Like model or controller di.xml




Re: Migration from Magento 1.x to Magento 2.x

Hi Namita @WorldNet TPS


Following links may be helpful for you.(Magento 2 is also new to me so can not provide much help)


Add a custom payment method to checkout


Implementing payment gateway in Magento 2


Magento 2 Payment Gateway API


Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: Migration from Magento 1.x to Magento 2.x



Thank you so much for you prompt response and information provided. I think we are on the same boat Smiley Happy .

I am already using this sites for reference.  But still on the same situation.  I think I am missing something with composer part. I didn't install my extension or module using composer. I am just putting my module in app/code folder and expecting results. 


If you have any further knowledge on this regards  please let me know. I am really grateful for your help.





Re: Migration from Magento 1.x to Magento 2.x

Hi @WorldNet TPS


I suggest you to post you question on also. You may get your answer there.

If you get answer there please update you post on forum also.

Problem Solved Click Accept as Solution!:Magento Community India Forum