cancel
Showing results for 
Search instead for 
Did you mean: 

How do you create a custom payment method/gateway in Magento 2?

How do you create a custom payment method/gateway in Magento 2?

I've been struggling with this for like two weeks. I have to make a custom payment method that redirects the user to an external page where they pay, and then return back to the magento store. This is my first time ever working with Magento. I'm using version 2.2.6, but I feel tremendously overwhelmed by the system and the docs really don't help at all. They're almost useless. I've been digging through the 10th page of google results, always finding the same tutorial with broken english and that doesn't do anything at all.

 

I thought there was much more information, given the popularity of this e-commerce and the time it's been alive. But it's surprisingly difficult to find anything. Or is everything concentrated in the incredible expensive official courses?

 

Please give me a hand.

2 REPLIES 2

Re: How do you create a custom payment method/gateway in Magento 2?

I know exactly what you feel. Same story here.

 

Of cause, you should start from Official documentation. You can find it quite unhelpful for your situation, because it focused on transactions-based credit card payments, not redirect to payment service. But it will help you to understand the basics.

The most complete and concrete answer I found on magento.stackexchange.com: How to post data to a payment provider when placing an order in Magento 2. Sadly, it's most accurate instruction for now. But there are a lot of questions left, as you can see from my topic.

Also, some useful information was given here, on forum: Help on creating a Payment Gateway that redirects to Payment Provider.

To figure out what's happening I recommend you to heavily investigate Magento\Braintree and magento2-gateway-ebanx repositories (Brazil / EBANX Account scenario is exactly what you need).

 
Feel free to ask some concrete questions on given information. Maybe, we could help each other.

Good luck and prey for some qualified help from community.

Re: How do you create a custom payment method/gateway in Magento 2?

You can follow the steps to achieve the standard payment method in Magento 2.

Create Payment method with Magento standard. 

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