cancel
Showing results for 
Search instead for 
Did you mean: 

How to create offline payment method like PurchaseOrder, COD etc

How to create offline payment method like PurchaseOrder, COD etc

Trying to create a simple offline payment method in Magento 2.3. After Magento 2.2, the abstract class

\Magento\Payment\Model\Method\AbstractMethod

has been deprecated, so I can't use it. Also, I am not connecting to the payment gateway. So, I am not sure whether to create Facade/Adapter for the same. Anyone can please help me on that ?

4 REPLIES 4

Re: How to create offline payment method like PurchaseOrder, COD etc

Hi @parththakkar99,

I have uploaded a custom offline payment method at below link and check if it will work for you.

https://drive.google.com/file/d/1PVknYrrOXJFhcJSX4H06LgodETq6CYdf/view?usp=drivesdk

I hope it will help you.

Re: How to create offline payment method like PurchaseOrder, COD etc

Hi @vimal, I have downloaded the module. In this module, you have extended the class AbstratcMethod in model class. But this class is deprecated in Magento 2.3. Now we have to work with the Adapter class. Do you have created any module using that ?

Re: How to create offline payment method like PurchaseOrder, COD etc

Hi @Vimal Kumar 

 

your solution helped me alot in building another offline payment method.

The only problem that I am encountering is to display the instructions related to the payment method on the frontend.

 

I think that this is suppose to show the instructions ( <p data-bind="html: getInstructions()"></p>) but its not working - by any chance do you know what could be that is going wrong.

 

thanks again for your help

Re: How to create offline payment method like PurchaseOrder, COD etc

Hello @parththakkar99 

You can create a Custom Payment method using Magento Standard Way by following each step of the article.

Create Payment Method with Magento Standard Way by Adapter Class. 

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial